feat(cli): add @videojs/cli docs command for LLM-friendly installation (#1214)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Darius Cepulis
2026-04-14 11:07:49 -05:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 9681515446
commit 24b8b77c8a
49 changed files with 2061 additions and 460 deletions
+15
View File
@@ -34,6 +34,21 @@ export default function llmsMarkdown(): AstroIntegration {
emDelimiter: '*',
});
// Ensure [data-llms-only] content passes through despite hidden attribute
turndown.addRule('llms-only', {
filter: (node) => node.nodeType === 1 && (node as Element).getAttribute('data-llms-only') !== null,
replacement: (content) => content,
});
// Wrap [data-cli-replace] content with text markers the CLI can find and replace
turndown.addRule('cli-replace', {
filter: (node) => node.nodeType === 1 && (node as Element).getAttribute('data-cli-replace') !== null,
replacement: (content, node) => {
const id = (node as Element).getAttribute('data-cli-replace');
return `\n<!-- cli:replace ${id} -->\n${content}\n<!-- /cli:replace ${id} -->\n`;
},
});
// Track all docs and blog pages for llms.txt index
const docsPages: PageEntry[] = [];
const blogPages: PageEntry[] = [];