From 0441f97d8c95e0ccf207c858ab999f75f4e2378e Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Fri, 23 Oct 2020 14:51:10 +0200 Subject: [PATCH] Fixed citation page. Added announcement. Removed old build files. --- Gemfile | 8 ---- Makefile | 26 ++++-------- _config.yml | 1 - posts/2020-10-23-building-with-hakyll.md | 52 ++++++++++++++++++++++++ src/pages/citing.md | 32 ++++++++------- 5 files changed, 77 insertions(+), 42 deletions(-) delete mode 100644 Gemfile delete mode 100644 _config.yml create mode 100644 posts/2020-10-23-building-with-hakyll.md diff --git a/Gemfile b/Gemfile deleted file mode 100644 index f491af50..00000000 --- a/Gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# NOTE: the Gemfile is no longer used by the main distribution of PLFA, -# but is still used to build legacy versions 19.07 and 20.08. - -source "https://rubygems.org" - -group :jekyll_plugins do - gem 'github-pages' -end diff --git a/Makefile b/Makefile index d7879782..a55de593 100644 --- a/Makefile +++ b/Makefile @@ -21,19 +21,7 @@ init: setup-check-fix-whitespace setup-check-htmlproofer ################################################################################# .PHONY: build -build: $(SITE_DIR) - -# TODO: replace these with dependencies on actual files - -$(SITE_DIR): \ - authors/ \ - contributors/ \ - css/ \ - courses/ \ - posts/ \ - public/ \ - src/ \ - templates/ \ +build: \ standard-library/ChangeLog.md stack build && stack exec site build @@ -45,7 +33,7 @@ standard-library/ChangeLog.md: ################################################################################# .PHONY: test -test: setup-install-htmlproofer $(SITE_DIR) +test: setup-install-htmlproofer build cd $(SITE_DIR) && htmlproofer \ --check-html \ --disable-external \ @@ -64,7 +52,7 @@ test: setup-install-htmlproofer $(SITE_DIR) ################################################################################# .PHONY: test-epub -test-epub: setup-check-epubcheck $(SITE_DIR)/plfa.epub +test-epub: setup-check-epubcheck build epubcheck $(SITE_DIR)/plfa.epub @@ -73,7 +61,8 @@ test-epub: setup-check-epubcheck $(SITE_DIR)/plfa.epub ################################################################################# .PHONY: watch -watch: +watch: \ + standard-library/ChangeLog.md stack build && stack exec site watch @@ -90,10 +79,9 @@ update-contributors: # Clean up and remove the cache ################################################################################# -# TODO: change hs/Main.hs to get rid of this dependency - .PHONY: clean -clean: standard-library/ChangeLog.md +clean: \ + standard-library/ChangeLog.md stack build && stack exec site clean diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 2f7efbea..00000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-minimal \ No newline at end of file diff --git a/posts/2020-10-23-building-with-hakyll.md b/posts/2020-10-23-building-with-hakyll.md new file mode 100644 index 00000000..aa160dda --- /dev/null +++ b/posts/2020-10-23-building-with-hakyll.md @@ -0,0 +1,52 @@ +--- +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][hakyll], a static site building written in Haskell. +All you need to do to build and serve PLFA locally is: +```bash +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”](/GettingStarted/#install-plfa-and-the-agda-standard-library) 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-main]. +- 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 index page was moved to [“src/plfa/index.md”][plfa-index].
+ The sections on the index pages are generated from [“src/plfa/toc.metadata”][plfa-toc]. + + The HTML templates were moved to the [“templates/”][plfa-templates] directory. + + The static files were moved to the [“public/”][plfa-public] directory. + + The pages were moved to the [“src/pages/”][plfa-pages] directory.
+ Pages that are a part of the book, as part of the front matter and back matter, e.g., [Preface](/Preface/), were moved to [“src/plfa/frontmatter/”][plfa-frontmatter] and [“src/plfa/backmatter/”][plfa-backmatter], respectively. + + We’ve moved to the latest version of the [Minima][jekyll-minima] theme, adapted for use with Hakyll, which is now explicitly stored in the repository. +- The historical versions which were built using Jekyll—19.08 and 20.07—are stored in the [“versions/”][plfa-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”][plfa-web] branch. +- The [acknowledgements](/Acknowledgements/) are built from the [contributors][plfa-contributors] directory. We regularly update these files using the GitHub API, using [“hs/UpdateContributors.hs”][plfa-update-contributors], but if your contribution wasn’t via a GitHub commit or it doesn’t show up for some reason, you can add yourself here! + + +[hakyll]: https://jaspervdj.be/hakyll/ +[pandoc-markdown]: https://pandoc.org/MANUAL.html#pandocs-markdown +[plfa-index]: https://github.com/plfa/plfa.github.io/tree/dev/src/plfa/index.md +[plfa-toc]: https://github.com/plfa/plfa.github.io/tree/dev/src/plfa/toc.metadata +[plfa-templates]: https://github.com/plfa/plfa.github.io/tree/dev/templates +[plfa-public]: https://github.com/plfa/plfa.github.io/tree/dev/public +[plfa-pages]: https://github.com/plfa/plfa.github.io/tree/dev/src/pages +[plfa-frontmatter]: https://github.com/plfa/plfa.github.io/tree/dev/src/plfa/frontmatter +[plfa-backmatter]: https://github.com/plfa/plfa.github.io/tree/dev/src/plfa/backmatter +[plfa-versions]: https://github.com/plfa/plfa.github.io/tree/dev/versions +[plfa-web]: https://github.com/plfa/plfa.github.io/tree/web/ +[plfa-contributors]: https://github.com/plfa/plfa.github.io/tree/dev/contributors +[plfa-main]: https://github.com/plfa/plfa.github.io/blob/dev/hs/Main.hs +[plfa-update-contributors]: https://github.com/plfa/plfa.github.io/blob/dev/hs/UpdateContributors.hs +[jekyll-minima]: https://github.com/jekyll/minima diff --git a/src/pages/citing.md b/src/pages/citing.md index 8ed6c12a..2ff1b64d 100644 --- a/src/pages/citing.md +++ b/src/pages/citing.md @@ -15,13 +15,15 @@ permalink : /Citing/ ### BibTeX - @Book{plfa2020, - author = {Philip Wadler and Wen Kokke and Jeremy G. Siek}, - title = {Programming Language Foundations in {A}gda}, - note = {Available at \url{http://plfa.inf.ed.ac.uk/20.07/}}, - year = 2020, - month = jul, - } +```bibtex +@Book{plfa20.07, + author = {Philip Wadler and Wen Kokke and Jeremy G. Siek}, + title = {Programming Language Foundations in {A}gda}, + year = {2020}, + month = jul, + url = {http://plfa.inf.ed.ac.uk/20.07/}, +} +``` ## PLFA version 19.08 @@ -35,10 +37,12 @@ permalink : /Citing/ ### BibTeX - @Book{plfa2019, - author = {Philip Wadler and Wen Kokke}, - title = {Programming Language Foundations in {A}gda}, - note = {Available at \url{http://plfa.inf.ed.ac.uk/19.08/}}, - year = 2019, - month = aug, - } +```bibtex +@Book{plfa19.08, + author = {Philip Wadler and Wen Kokke}, + title = {Programming Language Foundations in {A}gda}, + year = {2019}, + month = aug, + url = {http://plfa.inf.ed.ac.uk/19.08/}, +} +```