The LiveView docs have the following note:
If you find yourself needing to dynamically patch other parts of the base layout, such as injecting new scripts or styles into the
<head>
during live navigation, then a regular, non-live, page navigation should be used instead . Assigning the@page_title
updates thedocument.title
directly, and therefore cannot be used to update any other part of the base layout.
I ran into a scenario in a project I’m working on where it seemed like it would be helpful to do that so I started messing around with hooks and was able to get something which works: Load Dynamic Head Files · wittjosiah/dynamic_head_files@959f383 · GitHub.
Given the above warning though, I suspect I might be missing something here, is there something wrong with that?