Docs: add comment with source to all auto-generated pages

This commit is contained in:
Lovell Fuller
2025-01-17 12:12:43 +00:00
parent eeac8d4656
commit 63f0ab5e20
10 changed files with 10 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ Object.keys(pages).forEach(async (m) => {
});
const cleanMarkdown =
`---\ntitle: ${pages[m]}\n---\n\n` +
`---\n# This file was auto-generated from JSDoc in lib/${m}.js\ntitle: ${pages[m]}\n---\n\n` +
markdown
.replace(/(## )([A-Za-z0-9]+)([^\n]*)/g, '$1$2\n> $2$3\n') // simplify headings
.replace(/<a name="[A-Za-z0-9+]+"><\/a>/g, '') // remove anchors