Redesign site and streamline playground

This commit is contained in:
2026-08-14 10:41:37 +09:00
parent 6653607ed3
commit e50458595b
9 changed files with 1362 additions and 495 deletions
+11
View File
@@ -94,6 +94,17 @@ export function allDocSlugs() {
return Object.keys(docs).filter((slug) => slug !== 'index');
}
export function docTitle(slug, items = nav) {
for (const item of items) {
if (item.slug === slug) return item.title;
if (item.children) {
const childTitle = docTitle(slug, item.children);
if (childTitle) return childTitle;
}
}
return slug;
}
export function renderMarkdown(slug) {
const source = docs[slug] ?? docs.index;
const html = marked.parse(source ?? '# Not found\n');