From 355d9c6e15bf25708bc3cf89022d748203c20158 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Mon, 28 Mar 2022 17:48:20 +0100 Subject: [PATCH 1/3] Show date and author for news pages only. --- themes/briar/layouts/_default/single.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/themes/briar/layouts/_default/single.html b/themes/briar/layouts/_default/single.html index d32a1bb..d3002cb 100644 --- a/themes/briar/layouts/_default/single.html +++ b/themes/briar/layouts/_default/single.html @@ -1,11 +1,13 @@ {{ define "main" }}

{{ .Title }}

- {{.Date.Format "January 2, 2006"}} by - {{ if (isset .Params "author") }} - {{ markdownify .Params.author }} - {{ else }} - The Briar Team + {{ if (eq .Type "news") }} + {{.Date.Format "January 2, 2006"}} by + {{ if (isset .Params "author") }} + {{ markdownify .Params.author }} + {{ else }} + The Briar Team + {{ end }} {{ end }}

{{ .Content }} -- GitLab From 9df5060eaf12ab69ea836847b65dc6c7662c19c2 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Mon, 28 Mar 2022 17:54:00 +0100 Subject: [PATCH 2/3] Show RSS icon for news index but not others (eg /hiring). --- themes/briar/layouts/_default/section.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/briar/layouts/_default/section.html b/themes/briar/layouts/_default/section.html index d0638f5..d7703a8 100644 --- a/themes/briar/layouts/_default/section.html +++ b/themes/briar/layouts/_default/section.html @@ -1,5 +1,5 @@ {{ define "main" }} -

{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}

+

{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }} {{ if (eq .Type "news") }} {{ end }}

{{ .Content }} {{ range .Pages.ByDate.Reverse }} {{ if not .Params.hide }} -- GitLab From 537c86aa991bba4fd6508de4d20b75ce9c30ff14 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Tue, 29 Mar 2022 11:38:23 +0100 Subject: [PATCH 3/3] Use a separate layout for news pages, use configurable author name. --- config.yaml | 2 +- themes/briar/layouts/_default/section.html | 17 ++------------- themes/briar/layouts/_default/single.html | 10 --------- themes/briar/layouts/news/section.html | 24 ++++++++++++++++++++++ themes/briar/layouts/news/single.html | 12 +++++++++++ 5 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 themes/briar/layouts/news/section.html create mode 100644 themes/briar/layouts/news/single.html diff --git a/config.yaml b/config.yaml index 6ec6da0..d28d8a2 100644 --- a/config.yaml +++ b/config.yaml @@ -11,7 +11,7 @@ Params: flatterid: 4pq200 Author: - name: Briar Team + name: The Briar Team # String to hex encoder: http://www.wbwip.com/wbw/emailencoder.html main: - identifier: torsten diff --git a/themes/briar/layouts/_default/section.html b/themes/briar/layouts/_default/section.html index d7703a8..b59ec48 100644 --- a/themes/briar/layouts/_default/section.html +++ b/themes/briar/layouts/_default/section.html @@ -1,24 +1,11 @@ {{ define "main" }} -

{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }} {{ if (eq .Type "news") }} {{ end }}

+

{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}

{{ .Content }} {{ range .Pages.ByDate.Reverse }} {{ if not .Params.hide }} -

+

{{.Title}}

- -
- {{ .Summary | safeHTML | truncate 250 }} - Read more → -
-
{{ end }} {{ end }} {{ end }} diff --git a/themes/briar/layouts/_default/single.html b/themes/briar/layouts/_default/single.html index d3002cb..e22c3a1 100644 --- a/themes/briar/layouts/_default/single.html +++ b/themes/briar/layouts/_default/single.html @@ -1,14 +1,4 @@ {{ define "main" }}

{{ .Title }}

-

- {{ if (eq .Type "news") }} - {{.Date.Format "January 2, 2006"}} by - {{ if (isset .Params "author") }} - {{ markdownify .Params.author }} - {{ else }} - The Briar Team - {{ end }} - {{ end }} -

{{ .Content }} {{ end }} diff --git a/themes/briar/layouts/news/section.html b/themes/briar/layouts/news/section.html new file mode 100644 index 0000000..7e2c3ee --- /dev/null +++ b/themes/briar/layouts/news/section.html @@ -0,0 +1,24 @@ +{{ define "main" }} +

{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}

+ {{ .Content }} + {{ range .Pages.ByDate.Reverse }} + {{ if not .Params.hide }} +

+ {{.Title}} +

+ +
+ {{ .Summary | safeHTML | truncate 250 }} + Read more → +
+
+ {{ end }} + {{ end }} +{{ end }} diff --git a/themes/briar/layouts/news/single.html b/themes/briar/layouts/news/single.html new file mode 100644 index 0000000..135199f --- /dev/null +++ b/themes/briar/layouts/news/single.html @@ -0,0 +1,12 @@ +{{ define "main" }} +

{{ .Title }}

+

+ {{.Date.Format "January 2, 2006"}} by + {{ if (isset .Params "author") }} + {{ markdownify .Params.author }} + {{ else }} + {{ .Site.Author.name }} + {{ end }} +

+{{ .Content }} +{{ end }} -- GitLab