elm-pages
elm-pages copied to clipboard
Can't create a custom link attribute in the Site.elm file
Currently I am unable to create a custom link attribute because I cannot call the Tag constructor without the Head.node function being exposed. I created a 1 line PR to expose the Head.node function here
Similar problem here. I would like to preload a font, like in this stackoverflow answer.
I'd also like to preload a font, and can't see how to with the way things are.
I've found a workaround for this in my case. This may not apply to others. I had a font that only appeared after some user interactions, and it the font which was flickering. I've now added an empty text node in that font to my view unconditionally, and it seems the font loads before the user interaction takes place now.
Hey there, so this is now possible in the v3 beta as I've added a hook in the config file to allow you to customize the head tags (with Vite processing as well): https://github.com/dillonkearns/elm-pages-v3-beta/blob/6a067671200f896c2a9b10a31aab307f88943973/examples/docs/elm-pages.config.mjs#L12-L15. See my comment here for more background: https://github.com/dillonkearns/elm-pages/pull/268#issuecomment-1296545316.
I think there are still some ideas to explore, but I'm going to close this issue since this is the current next step for this direction. Let's create some new discussion threads to explore ideas if any use cases that come up that aren't handled by that functionality. Thanks!