feat(website): Add LLMO optimization with JSON-LD and llms.txt#1236
feat(website): Add LLMO optimization with JSON-LD and llms.txt#1236
Conversation
Add WebSite and SoftwareApplication schema.org structured data to improve visibility in AI-generated search results and LLM citations. This includes project metadata, features, author info, and related links. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add vitepress-plugin-llms to automatically generate llms.txt and llms-full.txt during build. Configured with workDir: 'en' to generate from English docs only, and domain set to https://repomix.com for fully qualified URLs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR integrates the vitepress-plugin-llms (llmstxt) plugin into the VitePress configuration with English language support and domain specification, along with JSON-LD structured data injection into the document head. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the Repomix website's search engine optimization for Large Language Models (LLMO). It achieves this by embedding structured data using JSON-LD across all pages, providing rich context about the website and its software application. Additionally, it introduces an automated process to generate LLM-friendly documentation files, making the project's information more accessible and citable by AI systems. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Deploying repomix with
|
| Latest commit: |
5402898
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://41e6fe5d.repomix.pages.dev |
| Branch Preview URL: | https://worktree-jazzy-baking-sloth.repomix.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1236 +/- ##
=======================================
Coverage 87.14% 87.14%
=======================================
Files 115 115
Lines 4310 4310
Branches 998 998
=======================================
Hits 3756 3756
Misses 554 554 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces LLM Optimization (LLMO) by adding JSON-LD structured data for better search engine visibility and integrating vitepress-plugin-llms to generate llms.txt. The changes are well-implemented. I've provided one suggestion to improve maintainability by extracting duplicated hardcoded values into constants in the VitePress configuration.
| // JSON-LD Structured Data | ||
| const jsonLd = { | ||
| '@context': 'https://schema.org', | ||
| '@graph': [ | ||
| { | ||
| '@type': 'WebSite', | ||
| name: 'Repomix', | ||
| url: 'https://repomix.com', | ||
| description: 'Pack your codebase into AI-friendly formats', | ||
| }, | ||
| { | ||
| '@type': 'SoftwareApplication', | ||
| name: 'Repomix', | ||
| description: | ||
| 'A tool that packs your entire repository into a single, AI-friendly file for use with Large Language Models (LLMs) like ChatGPT, Claude, Gemini, and more.', | ||
| url: 'https://repomix.com', | ||
| applicationCategory: 'DeveloperApplication', | ||
| operatingSystem: 'Windows, macOS, Linux', | ||
| offers: { | ||
| '@type': 'Offer', | ||
| price: '0', | ||
| priceCurrency: 'USD', | ||
| }, | ||
| license: 'https://opensource.org/licenses/MIT', | ||
| isAccessibleForFree: true, | ||
| installUrl: 'https://www.npmjs.com/package/repomix', | ||
| downloadUrl: 'https://www.npmjs.com/package/repomix', | ||
| softwareRequirements: 'Node.js 20.0.0 or higher', | ||
| image: 'https://repomix.com/images/repomix-logo.svg', | ||
| screenshot: 'https://repomix.com/images/og-image-large.png', | ||
| author: { | ||
| '@type': 'Person', | ||
| name: 'Kazuki Yamada', | ||
| url: 'https://github.com/yamadashy', | ||
| }, | ||
| sameAs: ['https://github.com/yamadashy/repomix', 'https://www.npmjs.com/package/repomix'], | ||
| featureList: [ | ||
| 'AI-optimized output formats (XML, Markdown, JSON, Plain Text)', | ||
| 'Token counting for LLM context limits', | ||
| 'Git-aware file processing', | ||
| 'Security-focused with Secretlint integration', | ||
| 'Remote repository processing', | ||
| 'MCP Server integration', | ||
| 'Code compression with Tree-sitter', | ||
| 'Custom instructions support', | ||
| ], | ||
| }, | ||
| ], | ||
| }; |
There was a problem hiding this comment.
There are several hardcoded and duplicated values in the jsonLd object and throughout this file. To improve maintainability and ensure consistency, it's a good practice to define these values as constants and reuse them. This will make future updates easier and less error-prone.
For example, values like the site name, URL, GitHub repository, and author information are used in multiple places (jsonLd, manifest, themeConfig, llmstxt plugin).
I suggest extracting these into constants. You can then use these constants in other parts of the file as well to reduce duplication.
// Site metadata
const siteName = 'Repomix';
const siteUrl = 'https://repomix.com';
const siteDescription = 'Pack your codebase into AI-friendly formats';
const longDescription = 'A tool that packs your entire repository into a single, AI-friendly file for use with Large Language Models (LLMs) like ChatGPT, Claude, Gemini, and more.';
const githubUrl = 'https://github.com/yamadashy/repomix';
const npmUrl = 'https://www.npmjs.com/package/repomix';
const authorName = 'Kazuki Yamada';
const authorUrl = 'https://github.com/yamadashy';
// JSON-LD Structured Data
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'WebSite',
name: siteName,
url: siteUrl,
description: siteDescription,
},
{
'@type': 'SoftwareApplication',
name: siteName,
description: longDescription,
url: siteUrl,
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Windows, macOS, Linux',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
license: 'https://opensource.org/licenses/MIT',
isAccessibleForFree: true,
installUrl: npmUrl,
downloadUrl: npmUrl,
softwareRequirements: 'Node.js 20.0.0 or higher',
image: `${siteUrl}/images/repomix-logo.svg`,
screenshot: `${siteUrl}/images/og-image-large.png`,
author: {
'@type': 'Person',
name: authorName,
url: authorUrl,
},
sameAs: [githubUrl, npmUrl],
featureList: [
'AI-optimized output formats (XML, Markdown, JSON, Plain Text)',
'Token counting for LLM context limits',
'Git-aware file processing',
'Security-focused with Secretlint integration',
'Remote repository processing',
'MCP Server integration',
'Code compression with Tree-sitter',
'Custom instructions support',
],
},
],
};There was a problem hiding this comment.
🧹 Nitpick comments (1)
website/client/.vitepress/config/configShard.ts (1)
21-69: Centralize shared site metadata to reduce SEO/config drift.
name,url, and short description are duplicated across JSON-LD, manifest, and head tags; extracting constants here will make future updates safer.♻️ Proposed refactor
+const SITE = { + name: 'Repomix', + url: 'https://repomix.com', + shortDescription: 'Pack your codebase into AI-friendly formats', +} as const; + // JSON-LD Structured Data const jsonLd = { '@context': 'https://schema.org', '@graph': [ { '@type': 'WebSite', - name: 'Repomix', - url: 'https://repomix.com', - description: 'Pack your codebase into AI-friendly formats', + name: SITE.name, + url: SITE.url, + description: SITE.shortDescription, },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/client/.vitepress/config/configShard.ts` around lines 21 - 69, Extract duplicated site metadata into shared constants and replace inline literals in the jsonLd object: create constants (e.g., SITE_NAME, SITE_URL, SITE_DESCRIPTION) near the top of configShard.ts and use those constants instead of hard-coded strings for name, url, and description inside the jsonLd object (and update any other places in this module that replicate these values such as manifest/head generation). Ensure jsonLd remains unchanged structurally—only replace repeated string literals with the new constants so future updates use the centralized values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@website/client/.vitepress/config/configShard.ts`:
- Around line 21-69: Extract duplicated site metadata into shared constants and
replace inline literals in the jsonLd object: create constants (e.g., SITE_NAME,
SITE_URL, SITE_DESCRIPTION) near the top of configShard.ts and use those
constants instead of hard-coded strings for name, url, and description inside
the jsonLd object (and update any other places in this module that replicate
these values such as manifest/head generation). Ensure jsonLd remains unchanged
structurally—only replace repeated string literals with the new constants so
future updates use the centralized values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8f0bc6c0-4b09-40cb-a70e-9d0e4178cea9
⛔ Files ignored due to path filters (1)
website/client/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
website/client/.vitepress/config/configShard.tswebsite/client/package.json
Extract duplicated values (siteName, siteUrl, siteDescription, ogImageUrl, githubUrl, npmUrl) into constants and reuse them across JSON-LD, OGP, manifest, sitemap, and plugin configurations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewOverall this is a clean, well-structured PR. The refactoring to extract shared metadata constants is a nice improvement that was also suggested by other reviewers — glad to see it already addressed in the latest commit. A few observations: Bug:
|
Change twitter:domain from full URL (https://repomix.com) to bare domain (repomix.com) as required by the Twitter Card specification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review (Follow-up)Previous feedback has been addressed in the latest commits — nice work:
Current StateNo new issues found. The PR is clean and ready to merge. Review detailsJSON-LD structured data: Well-structured
Constants refactoring: All hardcoded values are now centralized and used consistently across JSON-LD, OGP meta tags, PWA manifest, sitemap hostname, social links, and plugin config. Risk assessment: Low — changes are confined to VitePress config and a dev dependency. No impact on core Repomix functionality. Build-time plugin should be verified in CI. LGTM ✅ Reviewed by Claude |
Add LLM Optimization (LLMO) to the Repomix website to improve visibility in AI-generated search results and LLM citations.
Changes
WebSiteandSoftwareApplicationschema.org markup to all pages, including project metadata, features, author info, and related linksvitepress-plugin-llmsto automatically generate LLM-friendly documentation during build (workDir: 'en',domain: 'https://repomix.com')Checklist
npm run testnpm run lint