Metatags.LiveView (metatags v0.6.0)
View SourceLive-view specific helpers meant to be used by the integrating application.
currently only contains the on_mount/4 hook which will be called through the
routers live_session function:
@default_metatags Application.compile_env(:my_app, Metatags)
live_session :default, on_mount: [{Metatags.LiveView, {:init, @default_metatags}}] do
# ...
end
Summary
Functions
callback to be ran when mounting a live view. It initializes the live view
configuration onto the socket and attaches a hook on handle_params to automatically
put the canonical uri into the configuration.