View Source PlausibleWeb.StatsView (Plausible v0.0.1)

Summary

Functions

The resource name, as an atom, for this view

Returns a readable stats URL.

Renders the given template locally.

Callback invoked when no template is found. By default it raises but can be customized to render a particular template.

Functions

The resource name, as an atom, for this view

Returns a readable stats URL.

Native Phoenix router functions percent-encode all diacritics, resulting in ugly URLs, e.g. https://plausible.io/café.com transforms into https://plausible.io/caf%C3%A9.com.

This function encodes only the slash (/) character from the site's domain.

Examples

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "user.gittea.io/repo"}) "http://localhost:8000/user.gittea.io%2Frepo"

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "anakin.test"}) "http://localhost:8000/anakin.test"

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "café.test"}) "http://localhost:8000/café.test"

Link to this function

render(template, assigns \\ %{})

View Source

Renders the given template locally.

Link to this function

site_locked.html(assigns)

View Source
Link to this function

stats_container_class(conn)

View Source
Link to this function

template_not_found(template, assigns)

View Source
@spec template_not_found(binary(), map()) :: no_return()

Callback invoked when no template is found. By default it raises but can be customized to render a particular template.

Link to this function

waiting_first_pageview.html(assigns)

View Source