Skip to content

feat: add author meta tags for blog articles - #75

Merged
Gowiem merged 3 commits into
masterfrom
feat/author-meta-tags
Aug 19, 2025
Merged

feat: add author meta tags for blog articles#75
Gowiem merged 3 commits into
masterfrom
feat/author-meta-tags

Conversation

@oycyc

@oycyc oycyc commented Aug 18, 2025

Copy link
Copy Markdown
Member

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

  • New Features
    • Blog posts now include an author meta tag when an author is specified, improving attribution and richer link previews.
    • The meta tag is only added for blog content and is omitted elsewhere, so non-blog pages are unchanged.
    • No configuration required; posts without an author remain unaffected.

@oycyc
oycyc requested a review from a team as a code owner August 18, 2025 12:10
@netlify

netlify Bot commented Aug 18, 2025

Copy link
Copy Markdown

Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit dbabdb7
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/68a32eb69c5e7a0008708a74
😎 Deploy Preview https://deploy-preview-75--masterpoint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 21
Accessibility: 89
Best Practices: 92
SEO: 79
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds 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

Cohort / File(s) Summary of Changes
Head partial: conditional author meta tag
layouts/partials/head.html
Inserted a conditional block to render an author meta tag for blog posts when .Params.author is set; placed after meta description and before og:url. No impact on non-blog sections.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested reviewers

  • Gowiem

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 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 86b27b9 and dbabdb7.

📒 Files selected for processing (1)
  • layouts/partials/head.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • layouts/partials/head.html
⏰ 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)
  • GitHub Check: Redirect rules - masterpoint
  • GitHub Check: Header rules - masterpoint
  • GitHub Check: Pages changed - masterpoint
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/author-meta-tags

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
layouts/partials/head.html (1)

66-68: Prefer .Param and normalize/expand to support multiple authors and defaults

For 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.

📥 Commits

Reviewing files that changed from the base of the PR and between df78307 and 86b27b9.

📒 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.

@gberenice gberenice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oycyc nice addition! Please fix the failed check and I'll approve this.

@oycyc

oycyc commented Aug 18, 2025

Copy link
Copy Markdown
Member Author

@oycyc nice addition! Please fix the failed check and I'll approve this.

Updated!

@Gowiem
Gowiem merged commit df247a5 into master Aug 19, 2025
8 checks passed
@Gowiem
Gowiem deleted the feat/author-meta-tags branch August 19, 2025 22:17
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.

3 participants