feat: add author meta tags for blog articles - #75
Conversation
✅ Deploy Preview for masterpoint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdds a conditional author meta tag to the head partial for blog posts, rendering only when the page is in the "blog" section and an author parameter is present. Changes
Sequence Diagram(s)sequenceDiagram
participant Hugo as Hugo Renderer
participant Page as Page (.Section, .Params.author)
participant Head as head.html partial
Hugo->>Head: Render head partial
Head->>Page: Check Section == "blog"
alt Section is "blog"
Head->>Page: Check .Params.author
alt author present
Head-->>Hugo: Output <meta name="author" ...>
else author missing
Head-->>Hugo: Skip author meta
end
else non-blog
Head-->>Hugo: Skip author meta
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
layouts/partials/head.html (1)
66-68: Prefer .Param and normalize/expand to support multiple authors and defaultsFor better robustness and consistency with how meta fields above use filters:
- Use .Param "author" to leverage Hugo’s cascading params (section/site defaults).
- Pipe through plainify to strip accidental markup and normalize whitespace.
- Optionally support plural authors front matter (authors: [...]) and restrict to .IsPage.
- Optionally accept either Section or Type equal to "blog" to avoid organization coupling.
Suggested change:
- {{ if and (eq .Section "blog") (.Params.author) }} - <meta name="author" content="{{ .Params.author }}" /> - {{ end }} + {{ if and .IsPage (or (eq .Section "blog") (eq .Type "blog")) }} + {{ with .Params.authors }} + <meta name="author" content="{{ delimit . ", " | plainify }}" /> + {{ else }} + {{ with .Param "author" }} + <meta name="author" content="{{ . | plainify }}" /> + {{ end }} + {{ end }} + {{ end }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
layouts/partials/head.html(1 hunks)
🔇 Additional comments (1)
layouts/partials/head.html (1)
66-68: LGTM: Conditional author meta tag is safe and scoped to blog pages
- The guard ensures no effect on non-blog pages and skips when author is empty.
- Placement before og:url is fine and won’t interfere with existing tags.
Updated! |

Add the author meta tags for blog articles. Don't think it helps a lot but I thought of this as I saw it on news/article websites
https://www.geeksforgeeks.org/websites-apps/10-most-important-meta-tags-for-seo/#10-meta-author-tag
Summary by CodeRabbit