Updates
Exciting news! After a few days of mucking about and some Haskell learning, both the rss feed and tags are implemented as you can probably see! This will be a (relatively) short (I hope) post on what I was able to scrounge up to get them working (spoiler: its really dumb and not documented anywhere :sigh:), and hopefully this will be helpful to someone else out there who may be in the same boat.
The problem
How Hakyll works is you give it some files to either convert (in the case of markdown files and such) or link together to create a website. You can also apply templates and css to these files but thats not important for the problem at hand, which is, the rss page and the tags page(s) are not being created even though they are in the site.hs file so there shouldn’t be an issue. Below is the relevent site.hs code for whats going on here.
feedConfiguration :: FeedConfiguration
feedConfiguration =
FeedConfiguration
{ feedTitle = "Bog World News"
, feedDescription = "Latest news from the Bog"
, feedAuthorName = "ThePragmaticProgrammer"
, feedAuthorEmail = "pragmaticprogram@proton.me"
, feedRoot = "https://progblog.pages.dev"
}
... omitted for brevity
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
compile $ do
posts <- recentFirst =<< loadAll pattern
let ctx = constField "title" title
`mappend` listField "posts" (postCtxWithTags tags) (return posts)
`mappend` defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/tag.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
... omitted for brevity
create ["rss.xml"] $ do
route idRoute
compile $ do
let feedCtx = postCtx `mappend` bodyField "description"
posts <- fmap (take 10) . recentFirst =<< loadAllSnapshots "posts/*" "content"
renderRss feedConfiguration feedCtx posts
... omitted for brevity
postCtxWithTags :: Tags -> Context String
postCtxWithTags tags = tagsField "tags" tags `mappend` postCtxIf the code doesn’t make sense because you don’t know Haskell (I was in the same boat a few days ago no worries) it’s actually pretty simple. I won’t go into a huge amount of detail as the Hakyll tutorials do a pretty good job explaining whats going on, but it follows more or less a three step process for both the tag and rss generation which is:
- get the files needed to make the new file from (in this case both are using posts/* which contains all my posts, to get the post info and tag info for rss and tags respectively)
- compile the new file with the gathered info and the required context (which is simply the default context with the tags appended on)
- create the new file
That’s all and good, and follows the tutorials so let’s run the build tools and see what happens.
Running site build results in the following output, which if you look closely is missing something… where’s the rss file or the tag pages?
$~/progblog:site build
Initialising...
Creating store...
Creating provider...
Running rules...
Checking for out-of-date items
Compiling
Using async runtime with 16 threads...
updated images/base.png
updated css/default.css
updated templates/post-list.html
updated templates/default.html
updated templates/tag.html
updated templates/archive.html
updated templates/post.html
updated templates/sitemap.xml
updated posts/2025-07-28-addingfeatures.md
updated posts/2025-07-23-thoughtsonhakyllasabeginner.md
updated archive.html
updated index.html
SuccessA similar story for running stack exec site build
$~/progblog:stack exec site build
Initialising...
Creating store...
Creating provider...
Running rules...
Checking for out-of-date items
Compiling
Using async runtime with 16 threads...
updated images/base.png
updated css/default.css
updated templates/tag.html
updated templates/archive.html
updated templates/default.html
updated templates/post-list.html
updated templates/sitemap.xml
updated templates/post.html
updated posts/2025-07-28-addingfeatures.md
updated posts/2025-07-23-thoughtsonhakyllasabeginner.md
updated archive.html
updated sitemap.xml
updated index.html
Successstack exec site build and site build are the two recommended build tools but they don’t appear to be working so what’s going on here? Well, my first thought was that I had messed up the code somehow so I spent days looking up different ways to do this, to no avail. Ok well maybe its a caching thing, so lets run stack exec site rebuild and see what happens.
$~/progblog:stack exec site rebuild
Removing docs...
Removing _cache...
Removing _cache/tmp...
Initialising...
Creating store...
Creating provider...
Running rules...
Checking for out-of-date items
Compiling
Using async runtime with 16 threads...
updated images/base.png
updated css/default.css
updated templates/post-list.html
updated templates/archive.html
updated templates/tag.html
updated templates/post.html
updated templates/default.html
updated templates/sitemap.xml
updated posts/2025-07-23-thoughtsonhakyllasabeginner.md
updated posts/2025-07-28-addingfeatures.md
updated archive.html
updated sitemap.xml
updated index.html
SuccessStill no dice.Hmmmm.
The solution
The solution, fellow denizens of The Wired, is so incredibly simple and not discussed anywhere except for this github issue (that I could find at least). Put simply, you run cabal run -- site rebuild and it just works… let’s give that a go.
$~/progblog:cabal run -- site rebuild
Removing docs...
Removing _cache...
Removing _cache/tmp...
Initialising...
Creating store...
Creating provider...
Running rules...
Checking for out-of-date items
Compiling
Using async runtime with 16 threads...
updated images/base.png
updated css/default.css
updated templates/archive.html
updated templates/tag.html
updated templates/default.html
updated templates/post-list.html
updated templates/post.html
updated templates/sitemap.xml
updated posts/2025-07-23-thoughtsonhakyllasabeginner.md
updated tags/rant.html
updated tags/opinion.html
updated tags/vent.html
updated posts/2025-07-28-addingfeatures.md
updated rss.xml
updated sitemap.xml
updated tags/hakyll.html
updated tags/haskell.html
updated tags/programming.html
updated archive.html
updated index.html
SuccessLook at that! It all just works! I’m not sure why this isn’t mentioned anywhere else but, if you are using Hakyll and want rss and/or tags, I suggest you build with that command instead of site build or stack exec site build. Also here’s some proof of it not being anywhere in the Hakyll site.

Conclusion
Pretty silly huh? As is (will become?) tradition, if you made it this far, thank you for reading! Hopefully the next one is something a bit more exciting.