From fd4d238755e363fbe66461a599d5183ddccea418 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Thu, 27 May 2021 19:15:04 +0530 Subject: [PATCH] last edited partial --- config/_default/config.toml | 4 ++-- content/donate/index.md | 2 +- content/privacy-policy/index.md | 1 + content/security/index.md | 1 + layouts/_default/single.html | 3 +++ layouts/partials/main/blog-meta.html | 3 ++- layouts/partials/main/last-edited.html | 1 + 7 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 layouts/partials/main/last-edited.html diff --git a/config/_default/config.toml b/config/_default/config.toml index dbdd83b..afaf559 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -2,11 +2,11 @@ baseurl = "/" disableAliases = true disableHugoGeneratorInject = true enableEmoji = true -enableGitInfo = false +enableGitInfo = true enableRobotsTXT = true languageCode = "en-US" paginate = 7 -rssLimit = 10 +rssLimit = 100 # add redirects/headers [outputs] diff --git a/content/donate/index.md b/content/donate/index.md index da188b7..2197097 100644 --- a/content/donate/index.md +++ b/content/donate/index.md @@ -2,8 +2,8 @@ title: "Donate" description: "Donate to mCaptcha" date: 2021-05-27 -lastmod: 2021-05-27 draft: false +lastEdited: true --- mCaptcha is a small operation that is self-funded. At the time of diff --git a/content/privacy-policy/index.md b/content/privacy-policy/index.md index 945b1b5..8bb0b2d 100644 --- a/content/privacy-policy/index.md +++ b/content/privacy-policy/index.md @@ -5,6 +5,7 @@ date: 2021-05-26 lastmod: 2021-05-26 draft: false images: [] +lastEdited: true --- **TLDR**: We do not use cookies, we do not collect any personal data and diff --git a/content/security/index.md b/content/security/index.md index 18261cd..21ee7be 100644 --- a/content/security/index.md +++ b/content/security/index.md @@ -7,6 +7,7 @@ draft: false identifiers: "security" layout: "security" toc: true +lastEdited: true --- Security is at the heart of mCaptcha. If you find any discrepancies in diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6957afa..e3da829 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,6 +20,9 @@ {{ end }}

{{ .Title }}

+ {{ if .Params.lastEdited -}} + {{ partial "main/last-edited.html" . -}} + {{ end -}}

{{ .Params.lead | safeHTML }}

{{ partial "main/headline-hash.html" .Content }} {{ if .Site.Params.editPage -}} diff --git a/layouts/partials/main/blog-meta.html b/layouts/partials/main/blog-meta.html index 08c885d..127a476 100644 --- a/layouts/partials/main/blog-meta.html +++ b/layouts/partials/main/blog-meta.html @@ -1 +1,2 @@ -

Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read

\ No newline at end of file +

Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read

+{{ partial "main/last-edited.html" . -}} diff --git a/layouts/partials/main/last-edited.html b/layouts/partials/main/last-edited.html new file mode 100644 index 0000000..03b9c14 --- /dev/null +++ b/layouts/partials/main/last-edited.html @@ -0,0 +1 @@ +

Last Edited {{ .Lastmod.Format "January 2, 2006" }}