diff --git a/.gitea/workflows/hugo.yaml b/.gitea/workflows/hugo.yaml
index 5ccc4b6..37c7673 100644
--- a/.gitea/workflows/hugo.yaml
+++ b/.gitea/workflows/hugo.yaml
@@ -33,6 +33,12 @@ jobs:
submodules: recursive # Get submdules
fetch-depth: 1 # Fetch all history for .GitInfo and .Lastmod
+ - name: Setup required tools (Hugo)
+ uses: https://github.com/jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
+ with:
+ cache: false # no cache on gitea
+ github_token: ${{ secrets.GH_TOKEN }}
+
- name: Create configuration for Matomo
run: |
cp themes/hugo-sustain/static/config.php.sample static/config.php
@@ -40,12 +46,6 @@ jobs:
sed -i "s|__PROXY_URL__|${{ secrets.MATOMO_PROXY_URL }}|" static/config.php
sed -i "s|__TOKEN_AUTH__|${{ secrets.MATOMO_TOKEN_AUTH }}|" static/config.php
- - name: Setup Hugo
- uses: https://github.com/peaceiris/actions-hugo@v3.0.0
- with:
- hugo-version: "0.155.3"
- extended: true
-
- name: Build website with Hugo
run: hugo
diff --git a/config.toml b/config.toml
index 12a8b6b..e35bfb1 100755
--- a/config.toml
+++ b/config.toml
@@ -17,7 +17,6 @@ summaryLength = 50
[params]
avatar = "profile.png"
- author = "Max Mehl"
description = "Open Source expert with background in tech and policy. Focused on strategy, governance, and software supply chains. Building sustainable digital environments."
keywords = "open source, free software, Deutsche Bahn, DB Systel, FSFE, management, campaign, communication, strategy, konstanz, berlin, munster, IT service, politics, administration, scouts, founder"
@@ -25,6 +24,9 @@ summaryLength = 50
custom_css = ["comments/mastodon-comments.css"]
custom_js = ["comments/getcomments.js"]
+[params.author]
+ name = "Max Mehl"
+
[params.social]
Github = "mxmehl"
Git = "https://src.mehl.mx/mxmehl"
diff --git a/mise.toml b/mise.toml
new file mode 100644
index 0000000..a1c5d1a
--- /dev/null
+++ b/mise.toml
@@ -0,0 +1,2 @@
+[tools]
+hugo-extended = "0.157.0"
diff --git a/themes/hugo-sustain/layouts/_default/rss.xml b/themes/hugo-sustain/layouts/_default/rss.xml
index ef7a711..9ac9c4c 100644
--- a/themes/hugo-sustain/layouts/_default/rss.xml
+++ b/themes/hugo-sustain/layouts/_default/rss.xml
@@ -1,28 +1,70 @@
-{{ printf "" | safeHTML }}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- end }}
+
+{{- $pctx := . }}
+{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- $pages := slice }}
+{{- if or $.IsHome $.IsSection }}
+{{- $pages = $pctx.RegularPages }}
+{{- else }}
+{{- $pages = $pctx.Pages }}
+{{- end }}
+{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- if ge $limit 1 }}
+{{- $pages = $pages | first $limit }}
+{{- end }}
+{{- printf "" | safeHTML }}
{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ with .Title }} ({{.|humanize}}){{ end }}{{ end }}
{{ .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 }}
- {{ range .Pages }}
+ Hugo
+ {{ site.Language.LanguageCode }}
+ {{- with $authorEmail }}
+ {{.}}{{ with $authorName }} ({{ . }}){{ end }}
+ {{- end }}
+ {{- with $authorEmail }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }}
+ {{- end }}
+ {{- with .Site.Copyright }}
+ {{ . }}
+ {{- end }}
+ {{- if not .Date.IsZero }}
+ {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ {{- end }}
+ {{- with .OutputFormats.Get "RSS" }}
+ {{ printf "" .Permalink .MediaType | safeHTML }}
+ {{- end }}
+ {{- range $pages }}
-
{{ .Title }}
{{ .Permalink }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
- {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}
+ {{- with $authorEmail }}
+ {{.}}{{ with $authorName }} ({{.}}){{end}}
+ {{- end }}
{{ .Permalink }}
- {{ .Summary | html }}
- {{ .Content | html }}
+ {{ .Summary | transform.XMLEscape | safeHTML }}
+ {{ .Content | transform.XMLEscape | safeHTML }}
- {{ end }}
+ {{- end }}
diff --git a/themes/hugo-sustain/layouts/partials/head.html b/themes/hugo-sustain/layouts/partials/head.html
index 95fa156..1deb62c 100644
--- a/themes/hugo-sustain/layouts/partials/head.html
+++ b/themes/hugo-sustain/layouts/partials/head.html
@@ -15,7 +15,7 @@
-
+
{{ with .Site.Params.description }}{{ end }}
{{ with .Site.Params.keywords }}{{ end }}