From 9affc424098f8a3eafe4f302c7b84493b36adaec Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Fri, 23 Oct 2020 13:09:31 +0200 Subject: [PATCH] Added names in social, updated Makefile to checkout standard-library automatically. --- Makefile | 55 +++++++++++++++++++++++++++---------------- templates/social.html | 4 ++-- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index ca29253d..d7879782 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,22 @@ init: setup-check-fix-whitespace setup-check-htmlproofer .PHONY: build build: $(SITE_DIR) -$(SITE_DIR): authors contributors css courses hs posts public src templates +# TODO: replace these with dependencies on actual files + +$(SITE_DIR): \ + authors/ \ + contributors/ \ + css/ \ + courses/ \ + posts/ \ + public/ \ + src/ \ + templates/ \ + standard-library/ChangeLog.md stack build && stack exec site build +standard-library/ChangeLog.md: + git submodule update --recursive ################################################################################# # Test generated site with HTMLProofer @@ -34,16 +47,16 @@ $(SITE_DIR): authors contributors css courses hs posts public src templates .PHONY: test test: setup-install-htmlproofer $(SITE_DIR) cd $(SITE_DIR) && htmlproofer \ - --check-html \ - --disable-external \ - --report-invalid-tags \ - --report-missing-names \ - --report-script-embeds \ - --report-missing-doctype \ - --report-eof-tags \ - --report-mismatched-tags \ - --check-img-http \ - --check-opengraph \ + --check-html \ + --disable-external \ + --report-invalid-tags \ + --report-missing-names \ + --report-script-embeds \ + --report-missing-doctype \ + --report-eof-tags \ + --report-mismatched-tags \ + --check-img-http \ + --check-opengraph \ . ################################################################################# @@ -77,8 +90,10 @@ update-contributors: # Clean up and remove the cache ################################################################################# +# TODO: change hs/Main.hs to get rid of this dependency + .PHONY: clean -clean: +clean: standard-library/ChangeLog.md stack build && stack exec site clean @@ -107,15 +122,15 @@ publish: setup-check-rsync @echo "Creating web branch..." git fetch --all git checkout -b web --track origin/web - rsync -a \ - --filter='P _site/' \ - --filter='P _cache/' \ - --filter='P .git/' \ - --filter='P .gitignore' \ + rsync -a \ + --filter='P _site/' \ + --filter='P _cache/' \ + --filter='P .git/' \ + --filter='P .gitignore' \ --filter='P .stack-work' \ - --filter='P .nojekyll' \ - --filter='P CNAME' \ - --delete-excluded \ + --filter='P .nojekyll' \ + --filter='P CNAME' \ + --delete-excluded \ _site/ . git add -A @echo "Publishing web branch..." diff --git a/templates/social.html b/templates/social.html index 37340d5d..241854b3 100755 --- a/templates/social.html +++ b/templates/social.html @@ -1,8 +1,8 @@