You can use addWidget in your defaultLayout function to add it to widgets that are combined into a single file.
For example,
defaultLayout widget = do ... pc <- widgetToPageContent $ do $(widgetFile "mywidget") ... other stuff here ... ...
Now just put the file named mywidget.julius in the templates directory and it will be automatically included on all pages.
Jani Hartikainen
source share