From f0fe306cd4695f9086fb20011a26d80caedba4d3 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 20 Aug 2017 21:05:10 +0200 Subject: Implémente link canonical MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- headers.m4 | 2 +- index.m4 | 2 +- makefile | 22 +++++++++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/headers.m4 b/headers.m4 index 210e300..bdd15a9 100644 --- a/headers.m4 +++ b/headers.m4 @@ -2,7 +2,7 @@ TITLE_TITLE - + diff --git a/index.m4 b/index.m4 index cb65624..910b656 100644 --- a/index.m4 +++ b/index.m4 @@ -2,7 +2,7 @@ -include(headers.htm) +include(headers_index.htm) include(left.htm) diff --git a/makefile b/makefile index ee646c2..d37e116 100644 --- a/makefile +++ b/makefile @@ -25,15 +25,15 @@ bin/introFilter: src/introFilter.hs src/Id.hs ghc -dynamic $< -isrc -outputdir /tmp/introFilter -o $@ -article/%.html: article/%.md bin/articleFilter $(BASE_HTML) +article/%.html: article/%.md bin/articleFilter bin/titleFilter $(BASE_HTML) pandoc --filter bin/articleFilter $< > ${@:.html=.htm} m4 -D TITLE_TITLE="`pandoc --filter bin/titleFilter $<`" headers.m4 > ${basename $@}_header.html - m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=.html} -D HEADER_HEADER=${basename $@}_header.html article/article.m4 > $@ + m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=.html} -D HEADER_HEADER=${basename $@}_header.html -D CANONIC="//$@" article/article.m4 > $@ -contact/index.html: contact/index.md +contact/index.html: contact/index.md bin/titleFilter pandoc $< > ${@:.html=.htm} m4 -D TITLE_TITLE="`pandoc --filter bin/titleFilter $<`" headers.m4 > ${basename $@}_header.html - m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=.html} -D HEADER_HEADER=${basename $@}_header.html article/article.m4 > $@ + m4 -D tmpFileNameArticle=${@:.html=.htm} -D linkFileNameArticle=${<:.md=.html} -D HEADER_HEADER=${basename $@}_header.html -D CANONIC="//contact" article/article.m4 > $@ article/%_intro.html: article/%.md bin/introFilter pandoc --filter bin/introFilter $< > ${@:.html=.htm} @@ -42,9 +42,10 @@ article/%_intro.html: article/%.md bin/introFilter articles.htm: $(ALL_ARTICLES_INTRO_OUT) bin/introFilter cat $(ALL_ARTICLES_INTRO_OUT) > $@ +headers_index.htm: + m4 -D TITLE_TITLE="Licornes, hérissons et renards" -D CANONIC="//" headers.m4 > $@ - -index.html: index.m4 $(BASE_HTML) +index.html: index.m4 $(BASE_HTML) headers_index.htm m4 $< > $@ left.htm: res/twitterLogo.svg res/mastoLogo.svg res/gitLogo.svg res/acheLogo.svg left.m4 @@ -58,12 +59,19 @@ clean: rm -f articles.html rm -f $(ALL_ARTICLES:.md=_intro.htm) rm -f $(ALL_ARTICLES:.md=.htm) + rm -f article/*.htm + rm -f article/*_header.html + rm -f contact/*.htm + rm -f contact/*_header.html + rm -f headers_index.htm -mrproper: +mrproper: clean rm -f bin/* rm -f index.html rm -f $(ALL_ARTICLES_OUT) rm -f $(ALL_ARTICLES_INTRO_OUT) + rm -f contact/index.html + -- cgit v1.2.3-54-g00ecf