nycki.net/_includes/layouts/post.njk
2024-09-13 21:36:39 +00:00

39 lines
1.4 KiB
Text

---
layout: layouts/base.njk
---
{# Only include the syntax highlighter CSS on blog posts #}
{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}
{%- css %}{% include "public/css/prism-diff.css" %}{%- endcss %}
<h1>{{ title }}</h1>
<ul class="post-metadata">
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
</ul>
{{ content | safe }}
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/blog/tags/{{ tag | slugify }}/{% endset %}
<a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}
{%- endfor %}
{%- if collections.posts %}
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
{%- set nextPost = collections.posts | getNextCollectionItem %}
{%- if nextPost or previousPost %}
<ul class="links-nextprev">
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
</ul>
{%- endif %}
{%- endif %}
{# <div id="cusdis_thread"
data-host="https://cusdis.com"
data-app-id="1dd6bcd8-97df-4cc1-a8ab-6324f9c732d0"
data-page-id="{{ page.url | getPostId }}"
data-page-url="{{ metadata.url | noTrailingSlash }}{{ page.url }}"
data-page-title="{{ title | slugify }}"
data-theme="auto"
></div>
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script> #}