Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 10, 2025

Clarify custom frontmatter fields are not added to HTML head

Summary

This PR addresses user feedback about whether custom frontmatter fields can be added to the HTML head tag as metadata. The documentation now explicitly clarifies that only the documented SEO fields are recognized, and provides a link to the custom JavaScript workaround for analytics tracking use cases.

Changes:

  • Fixed og:sitenameog:site_name in frontmatter example to match the schema
  • Created reusable snippet seo-custom-metadata-note.mdx for the clarification message
  • Added snippet reference to both SEO metadata page and frontmatter page

Review & Testing Checklist for Human

  • Verify the core claim: Confirm that custom frontmatter fields are actually NOT added to the HTML head by inspecting page source or testing with a custom field
  • Test the link: Verify /learn/docs/customization/custom-css-js resolves correctly in the preview
  • Check og:site_name: Confirm og:site_name (with underscore) is the correct field name vs og:sitename (without underscore)
  • Verify snippet rendering: Check that the Info callout appears correctly on both pages in the preview

Notes

- Fix og:sitename to og:site_name in frontmatter example
- Add note to SEO metadata page that custom fields aren't supported
- Add note to frontmatter page SEO section with same clarification
- Link to custom JavaScript docs for analytics tracking workaround

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

- Create seo-custom-metadata-note.mdx snippet
- Replace inline notes in metadata.mdx and frontmatter.mdx with snippet reference
- Ensures consistent messaging across both pages

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@@ -0,0 +1,3 @@
<Info>
Only the documented SEO fields are recognized. Custom frontmatter fields are not added to the HTML head. For custom analytics tracking, use [custom JavaScript](/learn/docs/customization/custom-css-js).
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'aren't' instead of 'are not'.

@github-actions
Copy link
Contributor

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@devalog devalog merged commit 6753dd1 into main Nov 10, 2025
2 checks passed
@devalog devalog deleted the devin/1762796517-clarify-custom-metadata branch November 10, 2025 19: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