docs(docs-site): make core guides agent-friendly

This commit is contained in:
Luca Martial 2026-05-11 16:42:08 -07:00
parent dfa4651ebc
commit 9580bd243d
4 changed files with 191 additions and 1 deletions

View file

@ -97,5 +97,9 @@ function toLlmDocsPage(page: ReturnType<typeof source.getPages>[number]) {
}
function normalizeMarkdown(markdown: string) {
return markdown.trim().replace(/\n{3,}/g, "\n\n");
return markdown
.trim()
.replace(/^---\n[\s\S]*?\n---\n?/, "")
.trim()
.replace(/\n{3,}/g, "\n\n");
}