mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
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:
co-authored by
Claude Opus 4.6
parent
9681515446
commit
24b8b77c8a
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user