4 KiB
4 KiB
title |
---|
Building with Hakyll |
We’re pleased to announce that as of today, PLFA builds entirely using Haskell! We’ve 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.
There’s been lots of changes to the organisation of PLFA as a consequence, but the most important change, if you’re 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 you’re 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}
.
- For links, write
- Many of the files involved in rendering the website were moved:
- The index page was moved to “src/plfa/index.md”.
The sections on the index pages are generated from “src/plfa/toc.metadata”. - The HTML templates were moved to the “templates/” directory.
- The static files were moved to the “public/” directory.
- The pages were moved to the “src/pages/” directory.
Pages that are a part of the book, as part of the front matter and back matter, e.g., Preface, were moved to “src/plfa/frontmatter/” and “src/plfa/backmatter/”, respectively. - We’ve moved to the latest version of the Minima theme, adapted for use with Hakyll, which is now explicitly stored in the repository.
- The index page was moved to “src/plfa/index.md”.
- 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. We’ve been having trouble building and caching Agda on Travis for a while now, so until Agda starts publishing pre-built binaries, we’re 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 wasn’t via a GitHub commit or it doesn’t show up for some reason, you can add yourself here!