Skip to content

Fix PaperMod RSS template failure due to missing params.author in generated hugo.yaml#262

Merged
ashishb merged 1 commit into
mainfrom
copilot/fix-issue-255
Apr 2, 2026
Merged

Fix PaperMod RSS template failure due to missing params.author in generated hugo.yaml#262
ashishb merged 1 commit into
mainfrom
copilot/fix-issue-255

Conversation

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

PaperMod's rss.xml template accesses site.Author, which causes hugo to exit with status 1 when params.author is absent from hugo.yaml. This left the content/ directory empty with no actionable error surfaced by wp2hugo.

Changes

  • _HugoConfig.Params: Added Author struct with Name (required) and Email (omitempty) fields, serialized as params.author in hugo.yaml
  • setAuthor: New helper that picks the most common author across all posts (alphabetical tie-break), falling back to the site title if no post authors exist
  • updateConfig: Calls setAuthor so every generated hugo.yaml includes a valid params.author.name

The resulting config addition looks like:

params:
  author:
    name: "jdoe"

@ashishb ashishb marked this pull request as ready for review April 2, 2026 11:37
@ashishb ashishb merged commit 0c219c5 into main Apr 2, 2026
3 checks passed
@ashishb ashishb deleted the copilot/fix-issue-255 branch April 2, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants