Creates automatic placeholder titles for a Phoenix app layout.
If available in Hex, the package can be installed as:
- Add
default_title
to your list of dependencies inmix.exs
:
```elixir
def deps do
[
{:default_title, "~> 0.0.1"},
]
end
```
Open your Phoenix application’s layout file and add the call to the title tag:
<title><%= assigns[:page_title] || DefaultTitle.default_title(@conn) %></title>
The following options are available as a keyword list in the second argument:
separator:
* String used to separate the page and app titles
* Defaults to `|`
-
suffix:
- Application name shown after the page title
- Automatically inferred from the endpoint name by default
- Set to
:none
to disable