Sets up phoenix_page_meta in the Phoenix project
Performs three steps:
Creates
<AppWeb>.PageMeta— the project-local struct module thatuse PhoenixPageMetainjects behaviour and helpers into.Injects
<PhoenixPageMeta.Components.MetaTags.default>intolib/<app_web>/components/layouts/root.html.heex, right before the existing<.live_titleelement.Adds
@behaviour PhoenixPageMeta.LiveViewandimport PhoenixPageMeta.LiveView, only: [assign_page_meta: 1]afteruse Phoenix.LiveViewinside thedef live_viewmacro in the main web module.
All three steps are idempotent — re-running the task is safe.
Example
mix phoenix_page_meta.install