From dbe277b728e38a06893ab7b2a53999c4ada2eb34 Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Wed, 5 Jan 2022 08:06:10 +0100 Subject: [PATCH 01/13] offTheRecord: exclude posts from the lists --- layouts/_default/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index f4ff6ec..095b5e9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -27,7 +27,7 @@ {{- $pages := union .RegularPages .Sections }} {{- if .IsHome }} -{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- $pages = where ( where site.RegularPages "Type" "in" site.Params.mainSections ) ".Params.offTheRecord" "!=" true }} {{- end }} {{- $paginator := .Paginate $pages }} From cfea34d1522ee1ea0741f176488456691a88874f Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Wed, 5 Jan 2022 08:06:49 +0100 Subject: [PATCH 02/13] offTheRecord: exclude posts from the archive page --- layouts/_default/archives.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index e400e2c..d4d6e5b 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -9,7 +9,7 @@ {{- end }} -{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- $pages := where ( where site.RegularPages "Type" "in" site.Params.mainSections ) ".Params.offTheRecord" "!=" true }} {{- if site.Params.ShowAllPagesInArchive }} {{- $pages = site.RegularPages }} From c32906296a32f2eb8d8a8842d11f16835fe43f7c Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Wed, 5 Jan 2022 08:22:08 +0100 Subject: [PATCH 03/13] offTheRecord: exclude posts from the search results --- layouts/_default/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/index.json b/layouts/_default/index.json index feeb437..c6addbf 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,6 +1,6 @@ {{- $.Scratch.Add "index" slice -}} {{- range site.RegularPages -}} - {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} + {{- if and (not .Params.searchHidden) (ne .Params.offTheRecord true) (ne .Layout `archives`) (ne .Layout `search`) }} {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} {{- end }} {{- end -}} From fc929b774c66df830d70a63596f4603a0c3b9401 Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Wed, 5 Jan 2022 08:37:02 +0100 Subject: [PATCH 04/13] offTheRecord: exclude posts from RSS feeds --- layouts/_default/rss.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 134d50d..9b1585e 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -32,7 +32,7 @@ {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} {{ range $pages }} - {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} + {{- if and (ne .Layout `search`) (ne .Params.offTheRecord true) (ne .Layout `archives`) }} {{ .Title }} {{ .Permalink }} From 1f6cfbb3c2e750c209eb55d61cf2943f9425c54a Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Wed, 5 Jan 2022 09:13:21 +0100 Subject: [PATCH 05/13] offTheRecord: disable search engine indexation --- layouts/partials/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 261eea6..92b67ee 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,7 +1,7 @@ -{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.offTheRecord true) }} {{- else }} @@ -12,7 +12,7 @@ {{- /* Meta */}} {{- if .IsHome }} -{{ with site.Params.keywords -}}{{ end }} +{{ with .Site.Params.keywords -}}{{ end }} {{- else }} Date: Sun, 27 Feb 2022 23:28:02 +0100 Subject: [PATCH 06/13] offTheRecord: import default sitemap.xml --- layouts/sitemap.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 layouts/sitemap.xml diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..7fdcc50 --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,25 @@ + + + +{{ printf "" | safeHTML }} + + {{ range .Data.Pages }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end }} + \ No newline at end of file From c6fafd9918dc5f92ace5de599cebb3f9ec39509e Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Thu, 31 Mar 2022 02:45:02 +0200 Subject: [PATCH 07/13] offTheRecord: exclude posts from the sitemap --- layouts/sitemap.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index 7fdcc50..9f6c6ae 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -4,7 +4,7 @@ {{ printf "" | safeHTML }} - {{ range .Data.Pages }} + {{ range .Data.Pages }}{{ if ne .Params.offTheRecord true }} {{ .Permalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} @@ -21,5 +21,5 @@ href="{{ .Permalink }}" />{{ end }} - {{ end }} + {{ end }}{{ end }} \ No newline at end of file From 2231f9f5528ab4ff8ccc4ae04497f8f5fff3be90 Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Thu, 31 Mar 2022 04:42:26 +0200 Subject: [PATCH 08/13] offTheRecord: tiny fix --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 92b67ee..049399a 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -12,7 +12,7 @@ {{- /* Meta */}} {{- if .IsHome }} -{{ with .Site.Params.keywords -}}{{ end }} +{{ with site.Params.keywords -}}{{ end }} {{- else }} " | safeHTML }} +{{ printf "" | safeHTML }} - {{ range .Data.Pages }}{{ if ne .Params.offTheRecord true }} + {{ range .Data.Pages }} + {{- if .Permalink -}} {{ .Permalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} @@ -12,14 +10,15 @@ {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} {{ end }} {{ end }} - {{ end }}{{ end }} + {{- end -}} + {{ end }} \ No newline at end of file From 2ef85c305abd280cd40ecc4093a33368fbb63d69 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 28 May 2022 18:18:12 +0530 Subject: [PATCH 11/13] Modify just the line which can get the check done --- layouts/_default/sitemap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml index f5abe25..5bec19a 100644 --- a/layouts/_default/sitemap.xml +++ b/layouts/_default/sitemap.xml @@ -2,7 +2,7 @@ {{ range .Data.Pages }} - {{- if .Permalink -}} + {{- if and .Permalink (ne .Params.offTheRecord true) -}} {{ .Permalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} From e058a11a5f1f26c0cc68f608c4d23a22d5027225 Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Thu, 23 Jun 2022 02:49:31 +0200 Subject: [PATCH 12/13] open all external links in new tabs with "rel=noreferrer" --- layouts/_default/_markup/render-link.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 layouts/_default/_markup/render-link.html diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..8e131b9 --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1,3 @@ + + +{{ .Text | safeHTML }} \ No newline at end of file From 2bf7ab09edea395cfed2b95ee4425b545015771c Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Tue, 16 Aug 2022 10:58:09 +0200 Subject: [PATCH 13/13] [off] css ++ --- assets/css/common/post-single.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 675bb68..8573e47 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -3,10 +3,6 @@ margin: 24px auto var(--content-gap) auto; } -.post-title { - margin-bottom: 2px; - font-size: 40px; -} .post-description { margin-top: 10px;