Cannot get site.hs to change what its matching

Skip to first unread message

Nate Vogel

Mar 4, 2023, 12:08:12 AM3/4/23
to hakyll

I'm just exploring Hakyll, and I cannot get it to change the files its matching. I've installed with Cabal.

I run `hakyll-init test-blog`, and then `cabal build && site clean && site watch`. The base site looks great.

If I change what the pattern that `match` functions are matching on, for example:

 24     match "posts/nothing" $ do
 25         route $ setExtension "html"
 26         compile $ pandocCompiler
 27             >>= loadAndApplyTemplate "templates/post.html"    postCtx
 28             >>= loadAndApplyTemplate "templates/default.html" postCtx
 29             >>= relativizeUrls
And then I run again: `cabal build && site clean && site watch`

Shouldn't that break the generation of the sample blog posts? The site looks totally unchanged after I've done all this. I though that `match "posts/nothing"` should mean that no markdown files in /posts/ would be found to make blog posts out of.

Is this a strange cabal thing? Or am I doing something very silly? I feel like I should be breaking the site by changing these match patterns. But nothing changes! Any help identifying what I'm doing wrong would be much appreciated!


Yoo Chung

Mar 5, 2023, 10:52:57 AM3/5/23
to hakyll
Try "cabal run site ..." instead of "site ..."?  Or run "cabal install" before running any "site ..." commands?

I suspect the "site" binary you are executing is not the one rebuilt after you do a "cabal build".
Reply all
Reply to author
0 new messages