From 1bd03b780605e77efd25c178ade6ecd65c6f2006 Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 7 Dec 2022 13:40:38 -0600 Subject: [PATCH 1/5] docs(rss): add BaseURL to config.toml --- config.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 52d283b487..e316ee3561 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,5 @@ -baseURL = "/" +# baseURL = "/" +BaseURL = "https://docs.armory.io/" enableRobotsTXT = true enableInlineShortcodes = true From c1345770d80f9e68cee9e49474248f15693388eb Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 7 Dec 2022 14:20:51 -0600 Subject: [PATCH 2/5] change rss link to use RelPermLink use baseUrl="/" in config.toml add RSS template from theme --- config.toml | 6 ++- layouts/_default/list.rss.xml | 43 +++++++++++++++++++ .../partials/list-recent-release-notes.html | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 layouts/_default/list.rss.xml diff --git a/config.toml b/config.toml index e316ee3561..082deed127 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,7 @@ -# baseURL = "/" -BaseURL = "https://docs.armory.io/" +baseURL = "/" +#baseURL = "https://docs.armory.io/" + +#canonifyURLs = true enableRobotsTXT = true enableInlineShortcodes = true diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml new file mode 100644 index 0000000000..b74bc35794 --- /dev/null +++ b/layouts/_default/list.rss.xml @@ -0,0 +1,43 @@ + + + {{ .Site.Title }} – {{ .Title }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ if not $.Section }} + {{ $sections := .Site.Params.rss_sections | default (slice "blog") }} + {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" "in" $sections )) }} + {{ else }} + {{ if $.Parent.IsHome }} + {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" $.Section )) }} + {{ else }} + {{ .Scratch.Set "rss_pages" (first 50 $.Pages) }} + {{ end }} + {{ end }} + {{ range (.Scratch.Get "rss_pages") }} + + {{ .Section | title }}: {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + + {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $img := .Resize "640x" }} + {{ printf "]]>" $img.Permalink $img.Width $img.Height | safeHTML }} + {{ end }} + {{ .Content | html }} + + + {{ end }} + + diff --git a/layouts/partials/list-recent-release-notes.html b/layouts/partials/list-recent-release-notes.html index 0b8ee9f269..c52ed7efae 100644 --- a/layouts/partials/list-recent-release-notes.html +++ b/layouts/partials/list-recent-release-notes.html @@ -1,7 +1,7 @@
-

+

{{ $pages := (where .Site.Pages "Section" .Section).ByParam "version" }} {{ $pagesReverse := $pages.Reverse }} From f3885594be9990515ae260a256a8510cccecbb1e Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 7 Dec 2022 15:51:27 -0600 Subject: [PATCH 3/5] change .Permalink to .RelPermalink --- layouts/_default/list.rss.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index b74bc35794..fe7c0ce2eb 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -1,7 +1,7 @@ {{ .Site.Title }} – {{ .Title }} - {{ .Permalink }} + {{ .RelPermalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} @@ -25,7 +25,7 @@ {{ range (.Scratch.Get "rss_pages") }} {{ .Section | title }}: {{ .Title }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} From f13a23e823b999f812d8331ef50f007abd271870 Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 7 Dec 2022 15:57:51 -0600 Subject: [PATCH 4/5] change back to Permalink --- layouts/_default/list.rss.xml | 4 ++-- layouts/partials/list-recent-release-notes.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index fe7c0ce2eb..b74bc35794 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -1,7 +1,7 @@ {{ .Site.Title }} – {{ .Title }} - {{ .RelPermalink }} + {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} @@ -25,7 +25,7 @@ {{ range (.Scratch.Get "rss_pages") }} {{ .Section | title }}: {{ .Title }} - {{ .RelPermalink }} + {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} diff --git a/layouts/partials/list-recent-release-notes.html b/layouts/partials/list-recent-release-notes.html index c52ed7efae..e0cb9b7452 100644 --- a/layouts/partials/list-recent-release-notes.html +++ b/layouts/partials/list-recent-release-notes.html @@ -1,7 +1,7 @@
-

+

{{ $pages := (where .Site.Pages "Section" .Section).ByParam "version" }} {{ $pagesReverse := $pages.Reverse }} From ed0b2a94a466742e8a42c77168c7bcad1871a63a Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 7 Dec 2022 16:04:42 -0600 Subject: [PATCH 5/5] upgraded Hugo to 0.108.0 --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 2c5c946ecc..b6f676bb58 100755 --- a/netlify.toml +++ b/netlify.toml @@ -8,7 +8,7 @@ # "production" environment specific build settings [build.environment] - HUGO_VERSION = "0.71.1" + HUGO_VERSION = "0.108.0" HUGO_THEME = "docsy" HUGO_ENV = "production"