-
Notifications
You must be signed in to change notification settings - Fork 9
fix: Bump hextra and hugo #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yarikoptic
merged 5 commits into
ReproNim:main
from
yibeichan:fix-hextra-rss-hugo-0.160
Jul 20, 2026
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1ffbc19
fix: override Hextra RSS template for Hugo 0.160 compatibility
yibeichan 76950b2
bump Hextra to v0.12.3 and Hugo to 0.161.1
asmacdo 783f503
drop local RSS template override
asmacdo 686398d
drop unused .devcontainer/ scaffold
asmacdo 84f3480
migrate site.Data shortcodes to hugo.Data
asmacdo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| {{- /* | ||
| Local override of Hextra v0.8.3's layouts/_default/list.rss.xml. | ||
| The upstream template references the legacy .Site.Author hash, which | ||
| Hugo 0.160+ no longer exposes on the page.Site type, causing a hard | ||
| template error. This override reads the same values from | ||
| site.Params.author (set in hugo.yaml). | ||
| */ -}} | ||
| {{- $author := site.Params.author -}} | ||
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
| <channel> | ||
| <title>{{ site.Title }} – {{ .Title }}</title> | ||
| <link>{{ .Permalink }}</link> | ||
| <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 }} | ||
| <language>{{ . }}</language> | ||
| {{- end }} | ||
| {{- with $author.email }} | ||
| <managingEditor>{{ . }}{{ with $author.name }} ({{ . }}){{ end }}</managingEditor> | ||
| <webMaster>{{ . }}{{ with $author.name }} ({{ . }}){{ end }}</webMaster> | ||
| {{- end }} | ||
| {{- with site.Copyright }} | ||
| <copyright>{{ . }}</copyright> | ||
| {{- end }} | ||
| {{- if not .Date.IsZero }} | ||
| <lastBuildDate>{{ .Date.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 }} | ||
| {{ if not $.Section }} | ||
| {{ $sections := site.Params.rss.sections | default (slice "blog") }} | ||
|
asmacdo marked this conversation as resolved.
Outdated
|
||
| {{ .Scratch.Set "rssPages" (first 50 (where site.RegularPages "Type" "in" $sections)) }} | ||
| {{ else }} | ||
| {{ if $.Parent.IsHome }} | ||
| {{ .Scratch.Set "rssPages" (first 50 (where site.RegularPages "Type" $.Section)) }} | ||
| {{ else }} | ||
| {{ .Scratch.Set "rssPages" (first 50 $.Pages) }} | ||
| {{ end }} | ||
| {{ end }} | ||
| {{ range (.Scratch.Get "rssPages") }} | ||
| <item> | ||
| <title>{{ .Title }}</title> | ||
| <link>{{ .Permalink }}</link> | ||
| <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||
| {{- with $author.email }} | ||
| <author>{{ . }}{{ with $author.name }} ({{ . }}){{ end }}</author> | ||
| {{- end }} | ||
| <guid>{{ .Permalink }}</guid> | ||
| <description> | ||
| {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} | ||
| {{ with $img }} | ||
| {{ $img := .Resize "640x" }} | ||
| {{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }} | ||
| {{ end }} | ||
| {{ .Content | html }} | ||
| </description> | ||
| </item> | ||
| {{ end }} | ||
| </channel> | ||
| </rss> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.