Injecting a public assign to be used by all live view templates

I would like to have some public assign that i can access in all my templates. Any suggestions on how i can achieve this?

If it is specific to e.g. one logged in user or one browser, you could store it in the session (c.f. Plug.Conn get_session/2 and put_session/3).
If it is completely application-wide, you could e.g. use Application.put_env, but even better might be to just run a named GenServer with the desired values inside which you could ask for the current info.

Does those public assigns need diff tracking? If not so, you could put it in ETS (either under each channel (liveview) process or the main supervisor). If your templates are not a lot, passing those assigns deep down from the very top is probably fine, though it’s not that nice.