fakestache-ssg

[Archived] A static site generator in Bash 4.
Log | Files | Refs | Submodules | README

commit 8e42610d01af21abbcc4f4a63d7e80395ae18202
parent c1b0fd37ee3d1d9b99f5f2481dd9cac51140a37e
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Tue,  1 Nov 2016 15:37:23 -0400

Simplify the content of the mustache templates.

Diffstat:
Mtemplates/mustache/default-index.inc.mustache | 1+
Mtemplates/mustache/default-index.mustache | 10+++-------
Mtemplates/mustache/default.mustache | 17++++++++++-------
Mtemplates/mustache/feed/feed.mustache | 2+-
Mtemplates/mustache/index.mustache | 55+++++++++++++++++++++++--------------------------------
Mtemplates/mustache/partials/head.mustache | 18+-----------------
6 files changed, 39 insertions(+), 64 deletions(-)

diff --git a/templates/mustache/default-index.inc.mustache b/templates/mustache/default-index.inc.mustache @@ -4,5 +4,6 @@ rel="permalink"> $title$ </a> &mdash; + <time class="value" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time> </li> diff --git a/templates/mustache/default-index.mustache b/templates/mustache/default-index.mustache @@ -1,8 +1,6 @@ {{> partials/head.mustache }} -<body id="list" class="list"> - {{> partials/nav.button.mustache }} - +<body id="list" class="list"> <main> <div class="layout"> $body$ @@ -10,11 +8,9 @@ <ol class="list__list"> $for(include-after)$ $include-after$ - $endfor$ + $endfor$ </ol> </div> - </main> - - {{> partials/nav.mustache }} + </main> </body> </html> diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache @@ -1,21 +1,24 @@ {{> partials/head.mustache }} -<body id="single"> - {{> partials/nav.button.mustache }} - +<body id="single"> <article class="h-entry hentry"> <div class="layout e-content p-name single"> <!-- Pandoc var --> $body$ - </div> - - {{> partials/nav.mustache }} + </div> <footer> <address class="layout"> <hr/> - <p><a class="note__link u-url u-uid u-syndication" href="#" rel="bookmark">#</a> Créé à {{ SITE_AUTHOR_LOCALITY }} le <time class="dt-published" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time> par <a class="p-author author" href="{{ BASE_URL }}#hs" rel="author"><i>{{ SITE_AUTHOR }}</i></a>. $if(modified)$Modifié le <time class="dt-updated">$modified$</time>.$endif$ + <p> + <a class="u-url u-uid u-syndication" href="#" rel="bookmark">#</a> + + Créé à {{ SITE_AUTHOR_LOCALITY }} le <time class="dt-published" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time> par + + <a class="p-author author" href="{{ BASE_URL }}#hs" rel="author"><i>{{ SITE_AUTHOR }}</i></a>. + + $if(modified)$Modifié le <time class="dt-updated">$modified$</time>.$endif$ </p> </address> </footer> diff --git a/templates/mustache/feed/feed.mustache b/templates/mustache/feed/feed.mustache @@ -7,5 +7,5 @@ <updated>{{ NOW_DATE }}T{{ NOW_DATETIME }}</updated> $body$ - <!-- End of the feed --> + <!-- End of the feed --> </feed> diff --git a/templates/mustache/index.mustache b/templates/mustache/index.mustache @@ -1,38 +1,29 @@ {{> partials/head.mustache }} -<body id="index" prefix="foaf: http://xmlns.com/foaf/0.1/ dc: http://purl.org/dc/terms/"> - {{> partials/nav.button.mustache }} - - <div class="h-card" id="hs" resource="#hs" typeof="Person" vocab="http://schema.org/"> - <header> - <div class="layout"> - <h1 class="logo p-name" property="name">{{ SITE_AUTHOR }}</h1> - <h2 class="visuallyhidden p-job-title" property="jobTitle">{{ SITE_AUTHOR_TITLE }}</h2> - <a class="u-url visuallyhidden" href="{{ SITE_URL }}" rel="me">{{ SITE_URL }}</a> - </div> - </header> +<body id="index"> + <div> + <header> + <div class="layout"> + <h1 class="logo">{{ SITE_AUTHOR }}</h1> + <h2>{{ SITE_AUTHOR_TITLE }}</h2> + + <a class="u-url visuallyhidden" href="{{ SITE_URL }}" rel="me">{{ SITE_URL }}</a> + </div> + </header> - <main> - <div class="layout"> - <!-- Pandoc var --> - $body$ - </div> - </main> + <main> + <div class="layout"> + <!-- Pandoc var --> + $body$ + </div> + </main> - {{> partials/nav.index.mustache }} - - - <footer> - <address class="layout"> - <hr/> - Vous pouvez communiquer avec moi par courriel à - l'adresse <a href="mailto:{{ SITE_AUTHOR_EMAIL }}" rel="me"> - <span class="u-email" property="email">{{ SITE_AUTHOR_EMAIL }}</span></a>; - sinon vous pouvez également vous connecter au canal <abbr title="Inter Relay Chat">IRC</abbr> - <a href="irc://#htmlquebec@irc.freenode.net/">#htmlquebec</a> sur Freenode pour - me parler en direct. - </address> - </footer> - </div> + <footer> + <address class="layout"> + <hr/> + Vous pouvez communiquer avec moi par courriel à l'adresse <a href="mailto:{{ SITE_AUTHOR_EMAIL }}" rel="me">{{ SITE_AUTHOR_EMAIL }}</a>. + </address> + </footer> + </div> </body> </html> diff --git a/templates/mustache/partials/head.mustache b/templates/mustache/partials/head.mustache @@ -5,25 +5,9 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>$pagetitle$ &mdash; {{ SITE_DOMAINNAME }}</title> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <script src="{{ BASE_URL }}/js/vendor/modernizr-3.3.1-custom.min.js"></script> + <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="{{ BASE_URL }}/css/styles.css" /> - <!-- webmention.io --> - <link rel="pingback" href="https://webmention.io/hugo.soucy.cc/xmlrpc" /> - <link rel="webmention" href="https://webmention.io/hugo.soucy.cc/webmention" /> - - <link rel="me" href="http://shr.soucy.cc/" /> - <link rel="me" href="https://bandcamp.com/hs0ucy" /> - <link rel="me" href="https://framasphere.org/u/hs0ucy" /> - <link rel="me" href="http://twitter.com/hs0ucy" /> - <link rel="me" href="https://github.com/hs0ucy" /> - <link rel="me" href="sms:+15819966481" /> - - <link href="{{ BASE_URL }}/feed.note.atom.xml" type="application/atom+xml" rel="alternate" title="Feed des notes" /> - <link href="{{ BASE_URL }}/feed.txt.atom.xml" type="application/atom+xml" rel="alternate" title="Feed des textes" /> - - <meta name="robots" content="noindex, nofollow" /> <meta name="description" content="{{ SITE_DESCRIPTION }}" /> <meta name="author" content="{{ SITE_AUTHOR }}" /> <meta name="generator" content="{{ SITE_GENERATOR }}" />