From 53595f851dc1305963b2d181076f0c6f2a75f03a Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Fri, 19 Apr 2024 06:41:26 +0800 Subject: [PATCH] Use article heading if the content is an article --- src/_includes/main/content.njk | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/src/_includes/main/content.njk b/src/_includes/main/content.njk index af35b99b..100b67f4 100644 --- a/src/_includes/main/content.njk +++ b/src/_includes/main/content.njk @@ -3,9 +3,37 @@ layout: main/base ---
-

{{ pageTitle or title }}

- {% if desc %} -

{{ desc }}

+ {% 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 %}
@@ -27,4 +55,15 @@ layout: main/base {% if isArticle or title === "Articles" or tags and tags.includes("blog pages") %} {% include "main/content-nav.njk" %} {% endif %} - \ No newline at end of file + + + \ No newline at end of file