Added names in social, updated Makefile to checkout standard-library automatically.

This commit is contained in:
Wen Kokke 2020-10-23 13:09:31 +02:00
parent e43ff72ce2
commit 9affc42409
2 changed files with 37 additions and 22 deletions

View file

@ -23,9 +23,22 @@ init: setup-check-fix-whitespace setup-check-htmlproofer
.PHONY: build .PHONY: build
build: $(SITE_DIR) 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 stack build && stack exec site build
standard-library/ChangeLog.md:
git submodule update --recursive
################################################################################# #################################################################################
# Test generated site with HTMLProofer # Test generated site with HTMLProofer
@ -34,16 +47,16 @@ $(SITE_DIR): authors contributors css courses hs posts public src templates
.PHONY: test .PHONY: test
test: setup-install-htmlproofer $(SITE_DIR) test: setup-install-htmlproofer $(SITE_DIR)
cd $(SITE_DIR) && htmlproofer \ cd $(SITE_DIR) && htmlproofer \
--check-html \ --check-html \
--disable-external \ --disable-external \
--report-invalid-tags \ --report-invalid-tags \
--report-missing-names \ --report-missing-names \
--report-script-embeds \ --report-script-embeds \
--report-missing-doctype \ --report-missing-doctype \
--report-eof-tags \ --report-eof-tags \
--report-mismatched-tags \ --report-mismatched-tags \
--check-img-http \ --check-img-http \
--check-opengraph \ --check-opengraph \
. .
################################################################################# #################################################################################
@ -77,8 +90,10 @@ update-contributors:
# Clean up and remove the cache # Clean up and remove the cache
################################################################################# #################################################################################
# TODO: change hs/Main.hs to get rid of this dependency
.PHONY: clean .PHONY: clean
clean: clean: standard-library/ChangeLog.md
stack build && stack exec site clean stack build && stack exec site clean
@ -107,15 +122,15 @@ publish: setup-check-rsync
@echo "Creating web branch..." @echo "Creating web branch..."
git fetch --all git fetch --all
git checkout -b web --track origin/web git checkout -b web --track origin/web
rsync -a \ rsync -a \
--filter='P _site/' \ --filter='P _site/' \
--filter='P _cache/' \ --filter='P _cache/' \
--filter='P .git/' \ --filter='P .git/' \
--filter='P .gitignore' \ --filter='P .gitignore' \
--filter='P .stack-work' \ --filter='P .stack-work' \
--filter='P .nojekyll' \ --filter='P .nojekyll' \
--filter='P CNAME' \ --filter='P CNAME' \
--delete-excluded \ --delete-excluded \
_site/ . _site/ .
git add -A git add -A
@echo "Publishing web branch..." @echo "Publishing web branch..."

View file

@ -1,8 +1,8 @@
<ul class="social-media-list"> <ul class="social-media-list">
$if(github)$ $if(github)$
<li><a rel="me" href="https://github.com/$github$" title="$github$"><svg class="svg-icon grey"><use xlink:href="/public/minima-social-icons.svg#github"></use></svg></a></li> <li><a rel="me" href="https://github.com/$github$" title="$github$"><svg class="svg-icon grey"><use xlink:href="/public/minima-social-icons.svg#github"></use></svg>&nbsp;$github$</a></li>
$endif$ $endif$
$if(twitter)$ $if(twitter)$
<li><a rel="me" href="https://twitter.com/$twitter$" title="$twitter$"><svg class="svg-icon grey"><use xlink:href="/public/minima-social-icons.svg#twitter"></use></svg></a></li> <li><a rel="me" href="https://twitter.com/$twitter$" title="$twitter$"><svg class="svg-icon grey"><use xlink:href="/public/minima-social-icons.svg#twitter"></use></svg>&nbsp;$twitter$</a></li>
$endif$ $endif$
</ul> </ul>