From d173e77712917fdb9f76995cc9ac9b857965aaf9 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Sat, 15 Feb 2020 15:38:47 +0100 Subject: Make the website 3rd-party free and improve loading performance - Use webp in place of a regular png - Lazy loading of CSS files (compatible with javascript-less browsers) - KaTeX in place of MathJax - Minified CSS (using sass) - Vendoring fonts, scripts, and CSS. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 807cb27..95a80b2 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,16 @@ +SASS := $(shell find site/ -name "*.sass") ORG_POSTS := $(shell find site/ -name "*.org") COQ_POSTS := $(shell find site/ -name "*.v") -POSTS := $(ORG_POSTS:.org=.html) $(COQ_POSTS:.v=.html) +INPUTS := $(ORG_POSTS:.org=.html) $(COQ_POSTS:.v=.html) $(SASS:.sass=.css) COQCARGS := -async-proofs-cache force -build: ${POSTS} +build: ${INPUTS} @soupault - @scripts/update-gitignore.sh ${POSTS} + @scripts/update-gitignore.sh ${INPUTS} clean: - rm -f ${POSTS} + rm -f ${INPUTS} rm -rf build force: clean build @@ -27,4 +28,8 @@ force: clean build @echo "export $*.org" @emacs $< --batch --eval "(setq org-html-htmlize-output-type nil)" --eval "(org-html-export-to-html nil nil nil t)" --kill +%.css: %.sass + @echo "compile $*.sass" + @sassc --style=compressed --sass $< $@ + .PHONY: clean build force -- cgit v1.2.3