csci8980-f21/posts/2020-10-23-building-with-hakyll.md

4 KiB
Raw Permalink Blame History

title
Building with Hakyll

Were pleased to announce that as of today, PLFA builds entirely using Haskell! Weve migrated our build system from a bundle of Makefiles, shell scripts, and Jekyll, over to Hakyll, a static site building written in Haskell. All you need to do to build and serve PLFA locally is:

git clone --recurse-submodules https://github.com/plfa/plfa.github.io PLFA
cd PLFA/
stack build && stack exec site watch

That will pull in all the dependencies: Agda, the standard library, Hakyll, Pandoc, etc.

Theres been lots of changes to the organisation of PLFA as a consequence, but the most important change, if youre using PLFA as a student, is that we now include the correct version of the Agda standard library as a Git submodule. The “Getting Started” page can help you set it up correctly!

If youre a contributor to PLFA, there are some further changes that will affect you!

  • The main build file is “hs/Main.hs”.
  • PLFA is written using Pandoc Markdown:
    • For links, write /DeBruijn/ instead of {{ site.baseurl }}/DeBruijn/.
    • For explicit header anchors, write {name=my-anchor} instead of {#my-anchor}.
  • Many of the files involved in rendering the website were moved:
  • The historical versions which were built using Jekyll—19.08 and 20.07—are stored in the “versions/” directory. For future versions, we plan to pull these in for publication.
  • Support for Travis CI was dropped. Weve been having trouble building and caching Agda on Travis for a while now, so until Agda starts publishing pre-built binaries, were moving away from Travis. In the meantime, we will publish PLFA directly to the “web” branch.
  • The acknowledgements are built from the contributors directory. We regularly update these files using the GitHub API, using “hs/UpdateContributors.hs”, but if your contribution wasnt via a GitHub commit or it doesnt show up for some reason, you can add yourself here!