diff --git a/src/_includes/global/content.njk b/src/_includes/global/content.njk new file mode 100644 index 00000000..63f45e2e --- /dev/null +++ b/src/_includes/global/content.njk @@ -0,0 +1,65 @@ +
+ {% if isArticle %} + + +

{{ articleTitle }}

+
+

Posted on {{ date | niceDate }} by {{ sitemeta.siteAuthor.name }} + {% if updated %} + • Last updated on {{ updated | niceDate }}

+ {% endif %} + {% if categories %} +

Categories: + {% for cat in categories %} + {{ cat }}{% if not loop.last %}, {% endif %} + {% endfor %} +

+ {% endif %} +

{{ content | emojiReadTime }}

+
+ {% else %} +

{{ pageTitle or title }}

+ {% if desc %} +

{{ desc }}

+ {% endif %} + {% endif %} +
+ +
+ {% if toc %} + {% include "global/toc.njk" %} + {% endif %} + + {% if isArticle %} +
+ {{ content | safe }} +
+ {% else %} +
+ {{ content | safe }} +
+ {% endif %} + + {% if tags and tags.includes("contents") or title === "Articles" or tags and tags.includes("blog pages") %} + {% include "main/content-nav.njk" %} + {% endif %} +
+ + \ No newline at end of file diff --git a/src/_includes/main/content.njk b/src/_includes/main/content.njk index 91c9d0a2..79e86d45 100644 --- a/src/_includes/main/content.njk +++ b/src/_includes/main/content.njk @@ -2,68 +2,4 @@ layout: main/base --- -
- {% if isArticle %} - - -

{{ articleTitle }}

-
-

Posted on {{ date | niceDate }} by {{ sitemeta.siteAuthor.name }} - {% if updated %} - • Last updated on {{ updated | niceDate }}

- {% endif %} - {% if categories %} -

Categories: - {% for cat in categories %} - {{ cat }}{% if not loop.last %}, {% endif %} - {% endfor %} -

- {% endif %} -

{{ content | emojiReadTime }}

-
- {% else %} -

{{ pageTitle or title }}

- {% if desc %} -

{{ desc }}

- {% endif %} - {% endif %} -
- -
- {% if toc %} - {% include "global/toc.njk" %} - {% endif %} - - {% if isArticle %} -
- {{ content | safe }} -
- {% else %} -
- {{ content | safe }} -
- {% endif %} - - {% if tags and tags.includes("articles") or title === "Articles" or tags and tags.includes("blog pages") %} - {% include "main/content-nav.njk" %} - {% endif %} -
- - \ No newline at end of file +{% extends "global/content.njk" %} \ No newline at end of file