I’m not sure if it would be better for phx.gen.html
or phx.gen.live
to use the @page_title
assign by default in <.header>, but doing so would ensure the page title and header stay in sync—since you’d only need to set it in one place.
<.header>
{@page_title}
<:actions>
<.button variant="primary" navigate={~p"/posts/new"}>
<.icon name="hero-plus" /> New post
</.button>
</:actions>
</.header>
This applies to index.html.heex
and show.html.heex
, since form.html.heex
already follows that pattern.
I’d be happy to make those changes if you agree and find it useful.