summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Letan <lthms@soap.coffee>2020-02-15 15:38:47 +0100
committerThomas Letan <lthms@soap.coffee>2020-02-15 15:41:53 +0100
commitd173e77712917fdb9f76995cc9ac9b857965aaf9 (patch)
treeafc78e1cefc42ec7805a3d32e075ead603b8da5c /Makefile
parentSelf hosting of Fira Sans and various small fixes (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
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