Initial commit

This commit is contained in:
cheddar 2025-04-16 22:47:29 -04:00
commit f3955f6322
No known key found for this signature in database
22 changed files with 2422 additions and 0 deletions

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>{% if title %}{{ title }} - {% endif %}{{ metadata.title }}</title>
</head>
<body>
{{ content | safe }}
<footer>{% include "site_nav.njk" %}</footer>
</body>
</html>

View file

@ -0,0 +1,30 @@
---
layout: layouts/base.njk
---
<article>
<h1>{{ title }}</h1>
<address>by <a href="{{ author.url or metadata.author.url }}">
{{ author.name or metadata.author.name }}
</a></address>
<time datetime="{{ page.date | htmlDateString }}">published {{ page.date | readableDate }}</time>
{% if series %}
<aside>This article is part of a series: <a href="#seriesNav">{{ series.name }}</a></aside>
{% endif %}
{{ content | safe }}
</article>
{% if collections.posts %}
{% set previousPost = collections.posts | getPreviousCollectionItem %}
{% set nextPost = collections.posts | getNextCollectionItem %}
{% if nextPost or previousPost %}
<nav name="Article Navigation">
<ol>
{% if previousPost %}<li><a href="{{ previousPost.url}}">{{ previousPost.data.title }}</a></li>{% endif %}
{% if nextPost %}<li><a href="{{ nextPost.url}}">{{ nextPost.data.title }}</a></li>{% endif %}
</ol>
</nav>
{% endif %}
{% endif %}
{% if series %}
{% set seriesName = series.name %}
<nav name="Series Name Directory" id="seriesNav">{% include "series_list.njk" %}</nav>
{% endif %}

7
_includes/post_link.njk Normal file
View file

@ -0,0 +1,7 @@
{% if page.url != post.url %}
<a href="{{ post.url }}">{{ post.data.title }}</a>
{% else %}
{{ post.data.title }}
{% endif %} -
<time datetime="{{ post.date | htmlDateString }}">{{ post.date | htmlDateString }}</time>
{% if post.data.description %}<p>{{ post.data.description }}</p>{% endif %}

6
_includes/post_list.njk Normal file
View file

@ -0,0 +1,6 @@
<ol>
{%- for post in collections.posts %}
<li>{% include "post_link.njk" %}</li>
{%- endfor %}
</ol>

View file

@ -0,0 +1,6 @@
<h2>{{ seriesName }}</h2>
<ol>
{%- for post in collections.posts | seriesPosts(seriesName) %}
<li>{% include "post_link.njk" %}</li>
{%- endfor %}
</ol>

7
_includes/site_nav.njk Normal file
View file

@ -0,0 +1,7 @@
<nav name="Site Navigation">
<ul>
{% for sitePage in collections.site_nav %}
<li><a href="{{ sitePage.url }}">{{ sitePage.data.title }}</a></li>
{% endfor %}
</ul>
</nav>