mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-07 02:23:52 -06:00
feat: write the site for Starlight behind a flag
generate_site.py --engine starlight writes the pages, navigation and data files of an Astro Starlight project in website/. Links resolve to site addresses, every heading keeps its MkDocs id, and pages split by size are measured in the MkDocs Markdown so both builds cut the same files. The 839 pages and their 45,613 ids match the MkDocs build.
This commit is contained in:
1 parent
d2974660eb
commit
342d0f7271
26 files changed
+7817
-60
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { z } from 'astro/zod';
|
||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
|
||||
// The generator's own front matter, typed: a page with a misspelt level fails the build.
|
||||
export const collections = {
|
||||
docs: defineCollection({
|
||||
loader: docsLoader(),
|
||||
schema: docsSchema({
|
||||
extend: z.object({
|
||||
// Who the page is written for, from someone who knows nothing
|
||||
// (start) to someone adding to the project (contribute).
|
||||
level: z.enum(['start', 'setup', 'explore', 'reference', 'contribute']).optional(),
|
||||
// Search ranking of the first two levels.
|
||||
boost: z.number().min(1).max(10).optional(),
|
||||
// The date the page's content carries, for the sitemap.
|
||||
lastmod: z.string().optional(),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
};
|
||||
Reference in new issue
Block a user