How can I sort Julius files in a merged javascript file in Yesod?
Widget
it is essentially just a transformer WriterT
, and when you add a template, it is added after all other previously added templates. If you look at the implementation of scaffolddefaultLayout
, you can see that it just uses widgetFile
on default-layout
. This ends up including part hamlet
to part julius
, and part hamlet
includes the entire widget of a single page (if that makes sense ... it's really early here right now).
Simple solution: put the content default-layout.julius
in another file (for example default-layout-early.julius
) and then add $(widgetFile "default-layout-early")
before "default-layout". This should do the trick.
source to share