README
View SourcePhoenix Live Head
Provides commands for manipulating the HTML Head of Phoenix Live View applications while minimizing data over the wire.
The available command actions support a variety of utility operations useful for HTML Head manipulation. Such as setting or removing tag attributes and adding or removing CSS classes.
Note
When using this lib directly, consider publishing a high-level lib like Phx.Live.Favicon. High-level libs provide a cleaner syntax and specific documentation for their intended usage.
Status
Although updates may appear infrequent, the repository remains solid and fully operational.
Documentation
Documentation can be found at HexDocs.
Support, Feature Requests and Contributing
See CONTRIBUTING
Installation
The package can be installed by adding phoenix_live_head to your list of
dependencies in mix.exs:
def deps do
[
{:phoenix_live_head, "~> 1.0.0"}
]
endTo include the necessary client side Javascript, import the module in assets/js/app.js
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
import { Socket } from "phoenix"
import { LiveSocket } from "../vendor/phoenix_live_view/"
import topbar from "../vendor/topbar"
import "phoenix_live_head" // <-- ADD HERE.Development
- Assets can be build using
mix assets.build - Override
:phoenix_live_headin your test application with a local path:# example def deps do [ {:phoenix_live_head, path: "../phoenix_live_head", override: true} ] end