From d92a60023c5de8eede3b84568b17ea8007abb1a7 Mon Sep 17 00:00:00 2001 From: Eyal Kalderon Date: Wed, 3 Feb 2021 00:30:23 +0800 Subject: [PATCH 1/2] Render page.updated field if specified The style for rendering this optional field is copied from the original Terminal theme, as demonstrated on this page: https://hugo-terminal.now.sh/about --- content/fiz/index.md | 1 + templates/macros/posts.html | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/content/fiz/index.md b/content/fiz/index.md index 5117121..067d779 100644 --- a/content/fiz/index.md +++ b/content/fiz/index.md @@ -2,6 +2,7 @@ title="fiz" description="a basic demo of zola. Does it work?" date=2019-03-25 +updated=2021-02-03 author="elias" [taxonomies] diff --git a/templates/macros/posts.html b/templates/macros/posts.html index 47d063a..6f84ecf 100644 --- a/templates/macros/posts.html +++ b/templates/macros/posts.html @@ -23,6 +23,11 @@ {{ page.date | date(format="%Y.%m.%d") }} {# end of page.date if-check #} {%- endif -%} + + {%- if page.updated -%} + [Updated: {{ page.updated | date(format="%Y.%m.%d") }}] + {# end of page.updated if-check #} + {%- endif -%} From f8d10c1405ec68717922584fe364d1bf3bdeff19 Mon Sep 17 00:00:00 2001 From: Eyal Kalderon Date: Sun, 14 Mar 2021 12:03:35 -0400 Subject: [PATCH 2/2] Move feature demo to zerm article --- content/fiz/index.md | 1 - content/zerm/index.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/content/fiz/index.md b/content/fiz/index.md index 067d779..5117121 100644 --- a/content/fiz/index.md +++ b/content/fiz/index.md @@ -2,7 +2,6 @@ title="fiz" description="a basic demo of zola. Does it work?" date=2019-03-25 -updated=2021-02-03 author="elias" [taxonomies] diff --git a/content/zerm/index.md b/content/zerm/index.md index 7c1160e..dced401 100644 --- a/content/zerm/index.md +++ b/content/zerm/index.md @@ -2,6 +2,7 @@ title="what is zerm?" description="a summary of what zerm is and why it is different." date=2019-08-07 +updated=2021-02-03 [taxonomies] tags = ["rust", "test", "zola"]