From f1998c321a4eec6d75b58d84aa8610971bf21979 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 31 Jul 2021 11:35:39 -0600 Subject: move static files into static sub-dir, refactor nix a bit --- static/src/_layouts/post.html | 80 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 static/src/_layouts/post.html (limited to 'static/src/_layouts/post.html') 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 +--- +
+ +
+

+ {{ page.title | escape }} +

+
+ + + + • + {%- if page.updated %} + + • + {% endif -%} + {{ page.description }} +
+
+ + {% 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 %} +

+ This post is part of a series:
+ {% if prev %} + Previously: {{ prev.title }}
+ {% endif %} + {% if next %} + Next: {{ next.title }}
+ {% endif %} +

+ {% endif %} + {% endif %} + +
+ {{ content }} +
+ + {% if page.git_repo %} +

+ To check this project out locally:
+

git clone {{ page.git_repo }}
+{% if page.git_commit %}git checkout {{ page.git_commit }}{% endif %}
+

+ {% endif %} + + {% if prev or next %} +

+ If you liked this post, consider checking out other posts in the series:
+ {% if prev %} + Previously: {{ prev.title }}
+ {% endif %} + {% if next %} + Next: {{ next.title }}
+ {% endif %} +

+ {% endif %} + +
-- cgit v1.2.3