-
Notifications
You must be signed in to change notification settings - Fork 6
Add OpenGraph and Twitter metadata #327
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
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughUpdated src/partials/head-info.hbs to expand social metadata. Added Open Graph tags including dynamic og:type (set to "article" when page.component.title != 'home' AND page.layout != 'labs-search' AND page.attributes.role != 'home'; otherwise "website"), plus og:site_name and detailed og:image properties (type, alt, width, height). Introduced Twitter card metadata: twitter:card, twitter:title, twitter:description, twitter:image, and twitter:image:alt. No exported/public API changes. Sequence Diagram(s)sequenceDiagram
participant Page as Page context
participant Template as head-info.hbs
participant Output as HTML head
Page->>Template: provide page.title, layout, component.title, attributes, og data, image data
Template->>Template: evaluate conditions for og:type
alt non-home content
Template->>Output: emit og:type = "article"
else home or labs-search or role=home
Template->>Output: emit og:type = "website"
end
Template->>Output: emit og:* tags (title, description, site_name, image, image:type, image:alt, image:width, image:height)
Template->>Output: emit twitter:* tags (card, title, description, image, image:alt)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
✨ 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 (
|
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Actionable comments posted: 3
📜 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 ignored due to path filters (1)
src/img/redpanda_social-card.png
is excluded by!**/*.png
📒 Files selected for processing (1)
src/partials/head-info.hbs
(1 hunks)
🔇 Additional comments (1)
src/partials/head-info.hbs (1)
27-31
: Double-check og:type conditions cover all non-article pages.Logic looks fine. Please verify that all non-content pages (home variants, search, landing pages) are captured by this condition so they correctly render as
website
and don’t get misclassified asarticle
.
@coderabbitai review |
✅ Actions performedReview triggered.
|
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.
Huge improvement for socials and SEO.
This pull request enhances the documentation site's metadata for improved SEO and social media sharing, updates the site URL for deployment, and adds a description to the documentation preview page. The most important changes are grouped below:
SEO and Social Media Metadata Improvements:
head-info.hbs
to include Twitter-specific tags, improved default descriptions, and Open Graph enhancements for better sharing on social platforms. Also added dynamic selection ofog:type
and included a social card image with appropriate metadata.Site Configuration Update:
ui-model.yml
from a localhost address to the Netlify preview deployment URL, ensuring links and resources point to the correct environment.Documentation Preview Enhancement:
index.adoc
to clarify the purpose of the documentation UI preview page.Test
https://www.opengraph.xyz/url/https%3A%2F%2Fdeploy-preview-327--docs-ui.netlify.app%2F