Skip to content

feat(seo): add article date meta tags for blog posts#123

Open
oycyc wants to merge 2 commits into
masterfrom
feat/article-date-meta-tags
Open

feat(seo): add article date meta tags for blog posts#123
oycyc wants to merge 2 commits into
masterfrom
feat/article-date-meta-tags

Conversation

@oycyc

@oycyc oycyc commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
  • Emits og:type=article, article:published_time, and article:modified_time meta tags on blog posts, reinforcing the publish/updated dates already in our JSON-LD.
  • Gives Google consistent date signals across both formats, making posts eligible to display the last updated date in search results (improves perceived freshness).

For example, this article was updated, so it should update on SEO to show that it's better up to date:
image

Summary by CodeRabbit

  • New Features
    • Enhanced Open Graph metadata handling with section-specific tags for improved social sharing
    • Blog articles now include published and optional modified date information in meta tags

@oycyc oycyc requested a review from a team as a code owner June 11, 2026 22:21
@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit a33a74d
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/6a2b375f297dcf0008baaaef
😎 Deploy Preview https://deploy-preview-123--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: 33
Accessibility: 86
Best Practices: 100
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 Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@oycyc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 17 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 84473022-ea62-40ce-983f-f9c411e606ce

📥 Commits

Reviewing files that changed from the base of the PR and between 0dff351 and a33a74d.

📒 Files selected for processing (1)
  • layouts/partials/head.html

Walkthrough

The PR updates the head template's Open Graph meta tags to emit article-specific metadata for blog pages while retaining website metadata for other sections.

Changes

Blog-specific Open Graph Metadata Tags

Layer / File(s) Summary
Open Graph conditional meta tag rendering
layouts/partials/head.html
Conditional block emits og:type="article" with article:published_time and optional article:modified_time for blog section pages, preserving og:type="website" for non-blog sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • masterpointio/masterpoint.io#82: Updates layouts/partials/head.html for blog pages using date_modified field to emit structured data metadata similar to this PR's approach.
  • masterpointio/masterpoint.io#75: Modifies layouts/partials/head.html to conditionally emit additional blog-specific meta tags in the same template.

Suggested reviewers

  • Gowiem
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding article date meta tags (og:type, article:published_time, article:modified_time) for blog posts to improve SEO.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/article-date-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

Comment @coderabbitai help to get the list of available commands and usage tips.

@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: 1

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

13-13: 💤 Low value

Consider using consistent template functions for date formatting.

Line 13 uses .Date.Format (method syntax) while line 18 uses dateFormat (function syntax). Both work, but using the same approach improves consistency. Note: This pattern already exists in the JSON-LD section (lines 213 vs 215), so it's a broader file-level style choice.

♻️ Optional refactor for consistency
     {{ if .Params.date_modified }}
     <meta
       property="article:modified_time"
-      content="{{ .Params.date_modified | dateFormat "2006-01-02T15:04:05Z07:00" }}"
+      content="{{ (.Params.date_modified).Format "2006-01-02T15:04:05Z07:00" }}"
     />
     {{ end }}

Alternatively, use dateFormat for both (would require updating line 13 as well).

Also applies to: 18-18

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@layouts/partials/head.html` at line 13, Standardize date formatting by
replacing the method-style call .Date.Format "2006-01-02" with the template
function dateFormat used elsewhere (or vice versa if you prefer method-style);
update the instances that differ (e.g., the content attribute using .Date.Format
and the other occurrences using dateFormat, plus the JSON-LD occurrences where
lines use different styles) so all use the same form (preferably dateFormat for
consistency) across the file and ensure the same format string "2006-01-02" is
preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@layouts/partials/head.html`:
- Line 13: Update the meta tag date format to match the JSON-LD ISO 8601
datetime with timezone: replace the template content="{{ .Date.Format
"2006-01-02" }}" (and the equivalent for modified dates, e.g., .Lastmod.Format)
with the full format string "2006-01-02T15:04:05Z07:00" so
article:published_time and article:modified_time output the same
datetime+timezone that your JSON-LD (lines using "2006-01-02T15:04:05Z07:00")
already uses.

---

Nitpick comments:
In `@layouts/partials/head.html`:
- Line 13: Standardize date formatting by replacing the method-style call
.Date.Format "2006-01-02" with the template function dateFormat used elsewhere
(or vice versa if you prefer method-style); update the instances that differ
(e.g., the content attribute using .Date.Format and the other occurrences using
dateFormat, plus the JSON-LD occurrences where lines use different styles) so
all use the same form (preferably dateFormat for consistency) across the file
and ensure the same format string "2006-01-02" is preserved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fb9e067a-ca4b-4d1d-8ee8-e9429d9d044a

📥 Commits

Reviewing files that changed from the base of the PR and between 8cb86c3 and 0dff351.

📒 Files selected for processing (1)
  • layouts/partials/head.html

Comment thread layouts/partials/head.html Outdated
@oycyc oycyc force-pushed the feat/article-date-meta-tags branch from e6dc2ba to a99a62e Compare June 11, 2026 22:30
Comment on lines +9 to +23
{{ if eq .Section "blog" }}
<meta property="og:type" content="article" />
<meta
property="article:published_time"
content="{{ .Date.Format `2006-01-02T15:04:05Z07:00` }}"
/>
{{ if .Params.date_modified }}
<meta
property="article:modified_time"
content="{{ .Params.date_modified | dateFormat `2006-01-02T15:04:05Z07:00` }}"
/>
{{ end }}
{{ else }}
<meta property="og:type" content="website" />
{{ end }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the ONLY change. rest is trunk fmt

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.

1 participant