Compare commits

..

2 Commits

Author SHA1 Message Date
3dcbd2691b feat: add mise to configure Hugo version, and add to CI
Some checks failed
Website build and deploy / build (pull_request) Has been cancelled
2026-03-02 16:31:19 +01:00
66e70b3a81 chore: adapt to breaking changes in Hugo, update RSS template 2026-03-02 16:24:29 +01:00
5 changed files with 65 additions and 22 deletions

View File

@@ -40,11 +40,8 @@ jobs:
sed -i "s|__PROXY_URL__|${{ secrets.MATOMO_PROXY_URL }}|" static/config.php sed -i "s|__PROXY_URL__|${{ secrets.MATOMO_PROXY_URL }}|" static/config.php
sed -i "s|__TOKEN_AUTH__|${{ secrets.MATOMO_TOKEN_AUTH }}|" static/config.php sed -i "s|__TOKEN_AUTH__|${{ secrets.MATOMO_TOKEN_AUTH }}|" static/config.php
- name: Setup Hugo - name: Setup required tools (Hugo)
uses: https://github.com/peaceiris/actions-hugo@v3.0.0 uses: https://github.com/jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
with:
hugo-version: "0.155.3"
extended: true
- name: Build website with Hugo - name: Build website with Hugo
run: hugo run: hugo

View File

@@ -17,7 +17,6 @@ summaryLength = 50
[params] [params]
avatar = "profile.png" 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." 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" 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_css = ["comments/mastodon-comments.css"]
custom_js = ["comments/getcomments.js"] custom_js = ["comments/getcomments.js"]
[params.author]
name = "Max Mehl"
[params.social] [params.social]
Github = "mxmehl" Github = "mxmehl"
Git = "https://src.mehl.mx/mxmehl" Git = "https://src.mehl.mx/mxmehl"

2
mise.toml Normal file
View File

@@ -0,0 +1,2 @@
[tools]
hugo-extended = "0.157.0"

View File

@@ -1,28 +1,70 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | 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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ with .Title }} ({{.|humanize}}){{ end }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ with .Title }} ({{.|humanize}}){{ end }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo</generator>
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{ site.Language.LanguageCode }}</language>
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} {{- with $authorEmail }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} {{- end }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{- with $authorEmail }}
{{ with .OutputFormats.Get "RSS" }} <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{- end }}
{{ end }} {{- with .Site.Copyright }}
{{ range .Pages }} <copyright>{{ . }}</copyright>
{{- end }}
{{- if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{- end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{- with $authorEmail }}
<author>{{.}}{{ with $authorName }} ({{.}}){{end}}</author>
{{- end }}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
<content:encoded>{{ .Content | html }}</content:encoded> <content:encoded>{{ .Content | transform.XMLEscape | safeHTML }}</content:encoded>
</item> </item>
{{ end }} {{- end }}
</channel> </channel>
</rss> </rss>

View File

@@ -15,7 +15,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="{{ .Site.Params.Author }}" /> <meta name="author" content="{{ .Site.Params.Author.name }}" />
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }} {{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
{{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}" />{{ end }} {{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}" />{{ end }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}img/favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}img/favicon.ico" />