What are the comparative advantages and disadvantages of yst and hakyll static website generators?

StackOverflow https://stackoverflow.com/questions/20909806

  •  24-09-2022
  •  | 
  •  

Question

I maintain an academic website for myself that duplicates a lot of the material that I also put in my cv. To avoid having to maintain multiple files of the same information, and to keep things in sync, I use tex and bib files mostly, and I generate my cv in latex and use htlatex for the website.

As a project to improve my Haskell knowledge I have been thinking of generating my website with one of the haskell based static site generators. I have easily found several hakyll sites, but only a few yst, and it isn't clear to me what problem hakyll was designed to solve that wasn't being dealt with by yst. I am interested in learning what people see as the comparative advantages and disadvantages of each, and if there is any particular reason why I might want to start with one or the other given my current base of .tex and .bib files.

Was it helpful?

Solution

Disclaimer: I am the author of Hakyll.

What Hakyll gives you is an EDSL on top of pandoc, which allows you to more easily specify how different files should be processed. It is much like a specialized make on top of Pandoc. It also offers some other features which are useful for building static websites, i.e., manipulating URLS and HTML.

I think the main difference between yst and Hakyll is that Hakyll is on one side more customizable (since the configuration is just Haskell), but probably harder to get up and running as well.

OTHER TIPS

I don't know about hakyll, but yst uses pandoc (http://johnmacfarlane.net/pandoc/) and shines in combining a static site combined with a bit of dynamic data in yaml (for example events): it support a sql like mini language to insert these dynamic data fields in a template.

Yst also helps to build a multi-page website, which is a bit more difficult when using pandoc alone.

However, I found it a bit hard to insert other elements in the template which are not supported by yst by default (for example, a table of contents for the page itself).

Additionally, pandoc (used in the background) has become much more powerful with the advent of the yaml metadata block (http://johnmacfarlane.net/pandoc/README.html#yaml-metadata-block) which lets you insert virtually anything in the underlying template (for me, pandoc has replaced LaTeX completely as a input format, for pandoc can convert files to both html as well as LaTeX (among others)).

I would suggest you'd consider to use pandoc instead of yst, unless you need that mini sql language feature.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top