hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit 88f3cc3c5c1df9dd5f6e51dc04f128e2d19aba7d
parent 08d430f0dceb2f82b5ac9272eb19d7d0b2b3141b
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 11 Jul 2016 20:36:12 -0400

Add modify templates

Diffstat:
Mpanstash.sh | 10++++++++--
Mtemplates/mustache/default-index.inc.mustache | 4++--
Mtemplates/pandoc/curriculum-vitae.html | 2+-
Mtemplates/pandoc/default-index.html | 2+-
Atemplates/pandoc/default-index.inc.html | 8++++++++
Mtemplates/pandoc/default.html | 2+-
Mtemplates/pandoc/note-index.html | 2+-
Dtemplates/pandoc/txt.html | 79-------------------------------------------------------------------------------
8 files changed, 22 insertions(+), 87 deletions(-)

diff --git a/panstash.sh b/panstash.sh @@ -89,6 +89,12 @@ for indexsubdir in $(find $CONTENT_PATH/ -mindepth 2 -name index.md -exec dirnam # For each section page create a temporary "includes" folder mkdir $indexsubdir/includes + if [[ " ${templates[*]} " == *" $(basename "$indexsubdir") "* ]]; then + tplname=$(basename "$indexsubdir") + else + tplname=default + fi + # For all markdown files that are not "index.md" for markdown in $(find $indexsubdir/ -type f \( -name "*.md" ! -name "index.md" \)); do # Markdown files names without path @@ -104,7 +110,7 @@ for indexsubdir in $(find $CONTENT_PATH/ -mindepth 2 -name index.md -exec dirnam url=$(find $PUBLICHTML/ -type f -name ${outputname%.*}.html;) # Create all the includes files that make up section page and put them into the "includes" folder - pandoc $markdown -s --variable=url:$BASE_URL/${url#*/} --template=$TPL_PANDOC_PATH/$(basename "$indexsubdir")-index.inc.html -t html5 -o $indexsubdir/includes/$markdown_date-${outputname%.*}.inc.html + pandoc $markdown -s --variable=url:$BASE_URL/${url#*/} --template=$TPL_PANDOC_PATH/"$tplname"-index.inc.html -t html5 -o $indexsubdir/includes/$markdown_date-${outputname%.*}.inc.html done if test "$(ls -A "$indexsubdir/includes/")"; then @@ -115,7 +121,7 @@ for indexsubdir in $(find $CONTENT_PATH/ -mindepth 2 -name index.md -exec dirnam pandoc -t html5 $sorted_includes -o $indexsubdir/includes/includes.html --parse-raw # Merge the "includes.html" and "index.md" to create the section page list - pandoc -t html5 $indexsubdir/index.md -s --template=$TPL_PANDOC_PATH/note-index.html -A $indexsubdir/includes/includes.html -o $indexsubdir/index.html + pandoc -t html5 $indexsubdir/index.md -s --template=$TPL_PANDOC_PATH/"$tplname"-index.html -A $indexsubdir/includes/includes.html -o $indexsubdir/index.html # Remove the temporary "includes" folder and all his content rm -Rf $indexsubdir/includes/ diff --git a/templates/mustache/default-index.inc.mustache b/templates/mustache/default-index.inc.mustache @@ -3,6 +3,6 @@ href="$url$" rel="permalink"> $title$ - <!-- <time class="value">$date$</time> --> - </a> + </a> &mdash; + <time class="value">$date$</time> </li> diff --git a/templates/pandoc/curriculum-vitae.html b/templates/pandoc/curriculum-vitae.html @@ -104,7 +104,7 @@ <address class="layout"> <p>Page Web conçue par <a rel="author" href="http://hugo.soucy.cc#hs">Hugo Soucy</a> &amp; propulsée par HTML 5, <a href="https://www.w3.org/2012/pyRdfa/extract?uri=http%3A%2F%2Fhugo.soucy.cc%2F%23hs&format=xml&rdfagraph=output&vocab_expansion=false&rdfa_lite=false&embedded_rdf=true&space_preserve=true&vocab_cache=true&vocab_cache_report=false&vocab_cache_refresh=false">RDFa</a> &amp; un générateur de site statique fait maison. <br>Dernière - modification à Québec le <time datetime="2016-07-11T13:20">2016-07-11</time>.</p> + modification à Québec le <time datetime="2016-07-11T20:30">2016-07-11</time>.</p> </address> </footer> </body> diff --git a/templates/pandoc/default-index.html b/templates/pandoc/default-index.html @@ -88,7 +88,7 @@ <address class="layout"> <p>Page Web conçue par <a rel="author" href="http://hugo.soucy.cc#hs">Hugo Soucy</a> &amp; propulsée par HTML 5, <a href="https://www.w3.org/2012/pyRdfa/extract?uri=http%3A%2F%2Fhugo.soucy.cc%2F%23hs&format=xml&rdfagraph=output&vocab_expansion=false&rdfa_lite=false&embedded_rdf=true&space_preserve=true&vocab_cache=true&vocab_cache_report=false&vocab_cache_refresh=false">RDFa</a> &amp; un générateur de site statique fait maison. <br>Dernière - modification à Québec le <time datetime="2016-07-11T20:16">2016-07-11</time>.</p> + modification à Québec le <time datetime="2016-07-11T20:30">2016-07-11</time>.</p> </address> </footer> </body> diff --git a/templates/pandoc/default-index.inc.html b/templates/pandoc/default-index.inc.html @@ -0,0 +1,8 @@ +<li class="list__item h-entry hentry"> + <a class="list__link dt-published dt-updated u-url u-uid" + href="$url$" + rel="permalink"> + $title$ + </a> &mdash; + <time class="value">$date$</time> +</li> diff --git a/templates/pandoc/default.html b/templates/pandoc/default.html @@ -84,7 +84,7 @@ <address class="layout"> <p>Page Web conçue par <a rel="author" href="http://hugo.soucy.cc#hs">Hugo Soucy</a> &amp; propulsée par HTML 5, <a href="https://www.w3.org/2012/pyRdfa/extract?uri=http%3A%2F%2Fhugo.soucy.cc%2F%23hs&format=xml&rdfagraph=output&vocab_expansion=false&rdfa_lite=false&embedded_rdf=true&space_preserve=true&vocab_cache=true&vocab_cache_report=false&vocab_cache_refresh=false">RDFa</a> &amp; un générateur de site statique fait maison. <br>Dernière - modification à Québec le <time datetime="2016-07-11T13:20">2016-07-11</time>.</p> + modification à Québec le <time datetime="2016-07-11T20:30">2016-07-11</time>.</p> </address> </footer> </body> diff --git a/templates/pandoc/note-index.html b/templates/pandoc/note-index.html @@ -88,7 +88,7 @@ <address class="layout"> <p>Page Web conçue par <a rel="author" href="http://hugo.soucy.cc#hs">Hugo Soucy</a> &amp; propulsée par HTML 5, <a href="https://www.w3.org/2012/pyRdfa/extract?uri=http%3A%2F%2Fhugo.soucy.cc%2F%23hs&format=xml&rdfagraph=output&vocab_expansion=false&rdfa_lite=false&embedded_rdf=true&space_preserve=true&vocab_cache=true&vocab_cache_report=false&vocab_cache_refresh=false">RDFa</a> &amp; un générateur de site statique fait maison. <br>Dernière - modification à Québec le <time datetime="2016-07-11T13:20">2016-07-11</time>.</p> + modification à Québec le <time datetime="2016-07-11T20:30">2016-07-11</time>.</p> </address> </footer> </body> diff --git a/templates/pandoc/txt.html b/templates/pandoc/txt.html @@ -1,79 +0,0 @@ -<!DOCTYPE html> -<html class="no-js" lang="fr"> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <title>$pagetitle$ &mdash; hugo.soucy.cc</title> - - <meta name="viewport" content="width=device-width, initial-scale=1"> - - <link rel="stylesheet" href="http://hugo.soucy.cc/css/styles.css"> - <link rel="me" href="http://shr.soucy.cc/"> - - <meta name="robots" content="noindex, nofollow"> - <meta name="description" content="Développeur Web frontend ayant plus de 10 ans d'expérience dans le milieu des technologies de l'information. Il habite dans le quartier Limoilou à Québec."> - <meta name="author" content="Hugo Soucy"> - <meta name="generator" content="Panstash : Pandoc + Mustache + Bash"> - </head> - -<body id="txt" class="txt"> - <main> - <article class="layout h-entry hentry"> - $body$ - </article> - </main> - - <nav class="nav"> - <h2 class="visuallyhidden">Navigation</h2> - - <div class="layout"> - <a class="nav__button" href="#menu"> - <span class="nav__button__text"> - Menu <span class="visuallyhidden">principal</span> - </span> - - <span class="nav__burger"> - <i class="nav__burger__ico"></i> - </span> - </a> - </div> - - <div class="nav__panel" id="menu" tabindex="0"> - <div class="nav__panel__content layout"> - <ul class="nav__list" role="menubar"> - <li class="nav__item"> - <a class="nav__link" href="http://hugo.soucy.cc" rel="index"> - Page d'accueil - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="http://hugo.soucy.cc/note"> - Notes - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="http://hugo.soucy.cc/txt"> - Textes - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="http://hugo.soucy.cc/file/curriculum-vitae"> - Curriculum vitae - </a> - </li> - </ul> - </div> - - <a class="nav__close" href="#" role="button"> - <span class="nav__close__text"> - Fermer <span class="visuallyhidden">le menu</span> - </span> - - <span class="nav__x"> - <i class="nav__x__ico"></i> - </span> - </a> - </div> - </nav> -</body> -</html>