diff options
author | ache <ache@ache.one> | 2020-11-01 20:17:56 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2020-11-01 20:17:56 +0100 |
commit | ae80314f85d14dc62f47995641c71606b73d4ede (patch) | |
tree | 988fe5b7defe255c4d5aa546c3077d22f793f41c /makefile | |
parent | Add Discord article (diff) |
CSS Pubdate
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,7 +5,7 @@ HTML_MINIFIER_CMD=htmlmin BASE_HTML=tmp/left.htm tmp/headers.htm ALL_ARTICLES=$(wildcard articles/*.md) ALL_ARTICLES_OUT=$(ALL_ARTICLES:.md=.html) -ALL_ARTICLES_INTRO_OUT=$(addprefix articles/tmp/,$(notdir $(ALL_ARTICLES:.md=_intro.html))) +ALL_ARTICLES_INTRO_OUT=$(addprefix articles/tmp/,$(shell cat articles_intro_out)) SCRIPT_JS=s/js/main.js SHEET_CSS=s/css/style.css @@ -22,7 +22,7 @@ all: $(ALL_ARTICLES_OUT) $(BASE_HTML) index.html contact/index.html $(SHEET_CSS) # On compile le fichier md vers html (tmp/%.htm) # On rajoute les headers (tmp/%_header.htm) # On fini d'ajouter le squelette HTML (articles/%.html -articles/%.html: articles/%.md $(BASE_HTML) +articles/%.html: articles/%.md $(BASE_HTML) headers.m4 articles/article.m4 @echo "> CrĂ©ation des articles" mkdir -p articles/tmp cat $< | $(MD_CMD) > $(addprefix articles/tmp/,$(notdir $(@:.html=.htm))) @@ -33,7 +33,7 @@ articles/%.html: articles/%.md $(BASE_HTML) # On conserve le titre principale (dans tmp/%_intro.htm) # On y ajoute les deux premiers paragraphe (tmp/%_intro.html) # -articles/tmp/%_intro.html: articles/%.html +articles/tmp/%_intro.html: articles/%.html articles/intro.m4 @echo "> CrĂ©ation des introductions d'articles" mkdir -p articles/tmp @cat $< | $(CATCH_CMD) "h1" > $(@:.html=.htm) @@ -43,7 +43,7 @@ articles/tmp/%_intro.html: articles/%.html # > CrĂ©ation de la liste des introductions d'articles pour la page principale # On assemble juste les introductions d'articles ensemble -tmp/articles.htm: $(ALL_ARTICLES_INTRO_OUT) +tmp/articles.htm: $(ALL_ARTICLES_INTRO_OUT) articles_intro_out @echo "> CrĂ©ation de la liste des introductions d'articles" mkdir -p tmp cat $(ALL_ARTICLES_INTRO_OUT) > $@ @@ -61,7 +61,7 @@ index.html: index.m4 $(BASE_HTML) tmp/articles.htm # On compile le markdown en html (contact.htm) # On ajoute l'entĂȘte avec m4 (contact_header.html) # On ajoute le reste du squelette avec m4 (contact.html) -contact/index.html: contact/index.md +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 |