Skip to content

Commit d1fa239

Browse files
committed
feat(docs): use dynamic OG image for site default and homepage via roocode.com/api/og
1 parent 0f3f218 commit d1fa239

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords:
99
- AI pair programmer
1010
- code generation
1111
- documentation
12-
image: /img/social-share.jpg
12+
image: https://roocode.com/api/og?title=Roo%20Code%20Docs&description=AI-powered%20autonomous%20coding%20agent%20for%20VS%20Code%20-%20Complete%20documentation%2C%20guides%2C%20and%20tutorials
1313
---
1414

1515
# Roo Code Docs

docusaurus.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import {
1717
CAREERS_URL,
1818
WEBSITE_PRIVACY_URL,
1919
EXTENSION_PRIVACY_URL,
20-
GITHUB_REPO_URL
20+
GITHUB_REPO_URL,
21+
ROOCODE_OG_IMAGE_ENDPOINT
2122
} from './src/constants';
2223

2324
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
@@ -301,13 +302,15 @@ const config: Config = {
301302
{name: 'twitter:creator', content: '@roo_code'},
302303
{property: 'og:type', content: 'website'},
303304
{property: 'og:locale', content: 'en_US'},
305+
{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')}`},
306+
{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')}`},
304307
],
305308
colorMode: {
306309
defaultMode: 'dark',
307310
disableSwitch: false,
308311
respectPrefersColorScheme: false,
309312
},
310-
image: 'img/social-share.jpg', // Default Open Graph image
313+
image: `${ROOCODE_OG_IMAGE_ENDPOINT}?title=${encodeURIComponent('Roo Code Docs')}&description=${encodeURIComponent('AI-powered autonomous coding agent for VS Code - Complete documentation, guides, and tutorials')}`, // Default Open Graph image
311314
navbar: {
312315
logo: {
313316
alt: 'Roo Code Logo',

0 commit comments

Comments
 (0)