-
Notifications
You must be signed in to change notification settings - Fork 3
Clarify custom frontmatter fields are not added to HTML head #1894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- 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). | |||
There was a problem hiding this comment.
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'.
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
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:
og:sitename→og:site_namein frontmatter example to match the schemaseo-custom-metadata-note.mdxfor the clarification messageReview & Testing Checklist for Human
/learn/docs/customization/custom-css-jsresolves correctly in the previewog:site_name(with underscore) is the correct field name vsog:sitename(without underscore)Notes