Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Oct 22, 2025

This PR applies the same improvement from Roo-Code web (dynamic OG image generation) to our Docs site.\n\nSummary of changes:\n- Add centralized endpoint constant at src/constants.ts (ROOCODE_OG_IMAGE_ENDPOINT)\n- Configure site-wide dynamic OG/Twitter image via themeConfig.image at docusaurus.config.ts\n- Remove per-page static frontmatter images so pages fall back to dynamic default (bulk removal across docs)\n- Keep homepage explicitly pointing to dynamic OG URL at docs/index.md\n\nNotes:\n- Mirrors approach in Roo-Code PR #8773 using a centralized OG endpoint\n- Avoids duplicate OG tags by relying on themeConfig.image for defaults\n\nTesting:\n- Typecheck passes locally (npm run typecheck)\n- Lint:unused is currently not runnable due to missing ESLint flat config (unchanged by this PR)


Important

Implements dynamic OpenGraph images for social previews across the documentation site, centralizing the OG image endpoint and removing static images from individual pages.

  • Behavior:
    • Centralizes dynamic OpenGraph image generation using ROOCODE_OG_IMAGE_ENDPOINT in src/constants.ts.
    • Configures site-wide dynamic OG/Twitter image via themeConfig.image in docusaurus.config.ts.
    • Removes static frontmatter images from individual documentation pages, defaulting to dynamic images.
    • Keeps homepage pointing to dynamic OG URL in docs/index.md.
  • Testing:
    • Typecheck passes locally.
    • Lint:unused not runnable due to missing ESLint flat config.

This description was created by Ellipsis for 81410c3. You can customize this summary. It will automatically update as commits are pushed.

@vercel
Copy link

vercel bot commented Oct 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
roo-code-docs Ready Ready Preview Comment Oct 22, 2025 2:20pm

@roomote
Copy link
Contributor Author

roomote bot commented Oct 27, 2025

Review Summary

I've reviewed PR #387 and found 1 issue that should be addressed:

Issues to Fix

  • Duplicate Open Graph meta tags in docusaurus.config.ts (lines 305-306) - Remove explicit og:image and twitter:image metadata entries since themeConfig.image on line 313 already generates these tags automatically. This creates duplicate meta tags and contradicts the PR's goal of avoiding duplicates.

Follow Along on Roo Code Cloud

Comment on lines +305 to +306
{property: 'og:image', content: `${ROOCODE_OG_IMAGE_ENDPOINT}?title=${encodeURIComponent('Roo Code Docs')}&description=${encodeURIComponent('AI-powered autonomous coding agent for VS Code - Complete documentation, guides, and tutorials')}`},
{name: 'twitter:image', content: `${ROOCODE_OG_IMAGE_ENDPOINT}?title=${encodeURIComponent('Roo Code Docs')}&description=${encodeURIComponent('AI-powered autonomous coding agent for VS Code - Complete documentation, guides, and tutorials')}`},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Duplicate Open Graph image meta tags are being generated. Lines 305-306 explicitly add og:image and twitter:image to the metadata array, while line 313's themeConfig.image automatically generates the same meta tags. This contradicts the PR description's goal of "avoiding duplicate OG tags by relying on themeConfig.image for defaults." Remove lines 305-306 since themeConfig.image already handles both OG and Twitter images automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants