feat: support author avatar (photo)#1030
Open
kiannidev wants to merge 3 commits intodillonzq:masterfrom
Open
Conversation
added 2 commits
March 10, 2026 01:08
Add params.security.contentSecurityPolicy option to output CSP via meta tag
when HTTP headers cannot be set (e.g. static hosting).
Usage in hugo.toml:
[params.security]
contentSecurityPolicy = "default-src 'self'"
Ref: https://content-security-policy.com/examples/meta/
Add configurable author avatar support in post meta for single posts and summaries, reusing existing h-card/person styles and wiring avatar into SEO metadata. Made-with: Cursor
✅ Deploy Preview for hugo-loveit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
Hi, @dillonzq Thanks |
dillonzq
reviewed
Mar 11, 2026
Adjust post meta avatar styling so the author photo renders as a small inline avatar next to the name instead of appearing too large. Made-with: Cursor
Contributor
Author
Contributor
Author
|
Hi, @dillonzq Thanks |
Contributor
Author
|
Hi, @dillonzq Thanks |
Contributor
Author
|
Hi, @dillonzq |
Contributor
Author
|
Hi, @dillonzq |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Fixes #977
Implementation details
params.author.avatarin the theme config, and supportauthorAvatarin page front matter to override per post.layouts/posts/single.htmlandlayouts/summary.htmlto render the author via the existingplugin/h-cardpartial, passing the avatar URL when available.layouts/_partials/head/seo.htmlso the JSON-LD author object includes animagefield resolving the avatar as a Hugo resource or absolute URL.exampleSite/hugo.tomlto demonstrate configuring an avatar path so reviewers can see the behavior quickly when running the example site.Usage
[params.author]→avatar = "/images/avatar.png"authorAvatar: "/images/specific-author.png"