diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2021-07-31 11:35:39 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2021-07-31 11:35:39 -0600 |
commit | f1998c321a4eec6d75b58d84aa8610971bf21979 (patch) | |
tree | a90783eb296cc50e1c48433f241624f26b99be27 /static/src/_layouts/post.html | |
parent | 03a35dcc38b055f15df160bd300969e3b703d4b1 (diff) |
move static files into static sub-dir, refactor nix a bit
Diffstat (limited to 'static/src/_layouts/post.html')
-rw-r--r-- | static/src/_layouts/post.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/static/src/_layouts/post.html b/static/src/_layouts/post.html new file mode 100644 index 0000000..6b97042 --- /dev/null +++ b/static/src/_layouts/post.html @@ -0,0 +1,80 @@ +--- +layout: default +--- +<article itemscope itemtype="http://schema.org/BlogPosting"> + + <header id="post-header"> + <h1 id="post-headline" itemprop="name headline"> + {{ page.title | escape }} + </h1> + <div class="light"> + <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"> + <span itemprop="name">{{ site.author }}</span> + </span> + <!-- • --> + <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished"> + {{ page.date | date: site.date_format }} + </time> + • + {%- if page.updated %} + <time datetime="{{ page.updated | date_to_xmlschema }}" itemprop="dateModified"> + (Updated {{ page.updated | date: site.date_format }}) + </time> + • + {% endif -%} + <description itemprop="about"><em>{{ page.description }}</em></description> + </div> + </header> + + {% if page.series %} + {% assign foundThis = false %} + {% for post in site.posts reversed %} + {% if post.series == page.series %} + {% if post.url == page.url %} + {% assign foundThis = true %} + {% elsif foundThis %} + {% assign next = post %} + {% break %} + {% else %} + {% assign prev = post %} + {% endif %} + {% endif %} + {% endfor %} + {% if prev or next %} + <p class="light"><em> + This post is part of a series:<br/> + {% if prev %} + Previously: <a href="{{ prev.url | relative_url }}">{{ prev.title }}</a></br> + {% endif %} + {% if next %} + Next: <a href="{{ next.url | relative_url }}">{{ next.title }}</a></br> + {% endif %} + </em></p> + {% endif %} + {% endif %} + + <div id="post-content" itemprop="articleBody"> + {{ content }} + </div> + + {% if page.git_repo %} + <p class="light"> + <em>To check this project out locally:</em></br> + <pre><code>git clone {{ page.git_repo }} +{% if page.git_commit %}git checkout {{ page.git_commit }}{% endif %}</code></pre> + </p> + {% endif %} + + {% if prev or next %} + <p class="light"><em> + If you liked this post, consider checking out other posts in the series:<br/> + {% if prev %} + Previously: <a href="{{ prev.url | relative_url }}">{{ prev.title }}</a></br> + {% endif %} + {% if next %} + Next: <a href="{{ next.url | relative_url }}">{{ next.title }}</a></br> + {% endif %} + </em></p> + {% endif %} + +</article> |