From fffdabb6e7732250150e975e5e2fb5d9f3fabf74 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 5 May 2021 11:39:27 +0200 Subject: Fix canonical reference --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9ddba95..1db569a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ MD_CMD=npx remark --rc-path remarkrc +# pup is from github.com/ericchiang/pup CATCH_CMD=pup HTML_MINIFIER_CMD=htmlmin BASE_HTML=tmp/left.htm tmp/headers.htm @@ -28,7 +29,7 @@ articles/%.html: articles/%.md $(BASE_HTML) headers.m4 articles/article.m4 mkdir -p articles/tmp cat $< | $(MD_CMD) > $(addprefix articles/tmp/,$(notdir $(@:.html=.htm))) m4 -D TITLE_TITLE="`echo Licornes, hérissons et renards`" headers.m4 > $(addprefix articles/tmp/,$(notdir $(basename $@)_header.htm)) - m4 -D tmpFileNameArticle=$(addprefix articles/tmp/,$(notdir $(@:.html=.htm))) -D linkFileNameArticle=$(<:.md=) -D HEADER_HEADER=$(addprefix articles/tmp/,$(notdir $(basename $@)_header.htm)) -D CANONIC="/$@" articles/article.m4 | $(HTML_MINIFIER_CMD) > $@ + m4 -D tmpFileNameArticle=$(addprefix articles/tmp/,$(notdir $(@:.html=.htm))) -D linkFileNameArticle=$(<:.md=) -D HEADER_HEADER=$(addprefix articles/tmp/,$(notdir $(basename $@)_header.htm)) -D CANONIC="https://ache.one/$@" articles/article.m4 | $(HTML_MINIFIER_CMD) > $@ # > Création des introductions des articles # On conserve le titre principale (dans tmp/%_intro.htm) @@ -66,7 +67,7 @@ contact/index.html: contact/index.md headers.m4 articles/article.m4 @echo "> Création de la page de contact" $(MD_CMD) $< > $(@:.html=.htm) m4 -D TITLE_TITLE="`grep h1 $(@:.html=.htm) | cut -d'>' -f 2 | cut -d'<' -f 1`" headers.m4 > $(basename $@)_header.html - m4 -D tmpFileNameArticle=$(@:.html=.htm) -D linkFileNameArticle=$(<:.md=) -D HEADER_HEADER=$(basename $@)_header.html -D CANONIC="/contact" articles/article.m4 | $(HTML_MINIFIER_CMD) > $@ + m4 -D tmpFileNameArticle=$(@:.html=.htm) -D linkFileNameArticle=$(<:.md=) -D HEADER_HEADER=$(basename $@)_header.html -D CANONIC="https://ache.one/contact" articles/article.m4 | $(HTML_MINIFIER_CMD) > $@ # > Création du menu de gauche @@ -81,7 +82,7 @@ tmp/left.htm: s/imgM/twitterLogo.svg s/imgM/mastoLogo.svg s/imgM/gitLogo.svg s/i # Tout est fait par le fichier headers.m4. On définit simplement le titre. tmp/headers.htm: headers.m4 @echo "> Création de l'entête principale" - m4 -D TITLE_TITLE="Licornes, hérissons et renards - 🦄 🦔 🦊" -D CANONIC="/" headers.m4 > $@ + m4 -D TITLE_TITLE="Licornes, hérissons et renards - 🦄 🦔 🦊" -D CANONIC="https://ache.one" headers.m4 > $@ # > Création du fichier principale JavaScript # À partir du script `prepare` de npm. -- cgit v1.2.3