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

2

9

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.

Cryo answered 3/1, 2014 at 17:54 Comment(0)
N
11

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.

Nictitate answered 8/1, 2014 at 13:0 Comment(1)
trying to cabal install yst + gitit + hakyll in almost any order has typically resulted in a conflict for me and I have to sandbox one or another. It is not your fault or responsibility to fix this, but it is an inconvenience, and I just wanted to make you aware.Cryo
S
6

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.

Spinoff answered 7/1, 2014 at 19:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.