diff options
| author | Asai Neko <sugar@sne.moe> | 2025-12-07 19:07:57 +0800 |
|---|---|---|
| committer | Asai Neko <sugar@sne.moe> | 2025-12-07 19:07:57 +0800 |
| commit | 7c79e5cee930baf484aacb07b8a7ca93127de63a (patch) | |
| tree | 7038869caab18074d1314c545a081850a9b1875c /src | |
Initialize starlight with astro framework
Signed-off-by: Asai Neko <sugar@sne.moe>
Diffstat (limited to 'src')
| -rw-r--r-- | src/assets/houston.webp | bin | 0 -> 98506 bytes | |||
| -rw-r--r-- | src/content.config.ts | 7 | ||||
| -rw-r--r-- | src/content/docs/guides/example.md | 11 | ||||
| -rw-r--r-- | src/content/docs/index.mdx | 40 | ||||
| -rw-r--r-- | src/content/docs/reference/example.md | 11 |
5 files changed, 69 insertions, 0 deletions
diff --git a/src/assets/houston.webp b/src/assets/houston.webp Binary files differnew file mode 100644 index 0000000..930c164 --- /dev/null +++ b/src/assets/houston.webp diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 0000000..d9ee8c9 --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; +import { docsLoader } from '@astrojs/starlight/loaders'; +import { docsSchema } from '@astrojs/starlight/schema'; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/src/content/docs/guides/example.md b/src/content/docs/guides/example.md new file mode 100644 index 0000000..ebd0f3b --- /dev/null +++ b/src/content/docs/guides/example.md @@ -0,0 +1,11 @@ +--- +title: Example Guide +description: A guide in my new Starlight docs site. +--- + +Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. +Writing a good guide requires thinking about what your users are trying to do. + +## Further reading + +- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx new file mode 100644 index 0000000..e6ed51f --- /dev/null +++ b/src/content/docs/index.mdx @@ -0,0 +1,40 @@ +--- +title: Welcome to Starlight +description: Get started building your docs site with Starlight. +template: splash # Remove or comment out this line to display the site sidebar on this page. +hero: + tagline: Congrats on setting up a new Starlight project! + image: + file: ../../assets/houston.webp + actions: + - text: Example Guide + link: /guides/example/ + icon: right-arrow + - text: Read the Starlight docs + link: https://starlight.astro.build + icon: external + variant: minimal +--- + +import { Card, CardGrid } from '@astrojs/starlight/components'; + +## Next steps + +<CardGrid stagger> + <Card title="Update content" icon="pencil"> + Edit `src/content/docs/index.mdx` to see this page change. + </Card> + <Card title="Change page layout" icon="document"> + Delete `template: splash` in `src/content/docs/index.mdx` to display a + sidebar on this page. + </Card> + <Card title="Add new content" icon="add-document"> + Add Markdown or MDX files to `src/content/docs` to create new pages. + </Card> + <Card title="Configure your site" icon="setting"> + Edit your `sidebar` and other config in `astro.config.mjs`. + </Card> + <Card title="Read the docs" icon="open-book"> + Learn more in [the Starlight Docs](https://starlight.astro.build/). + </Card> +</CardGrid> diff --git a/src/content/docs/reference/example.md b/src/content/docs/reference/example.md new file mode 100644 index 0000000..0224f09 --- /dev/null +++ b/src/content/docs/reference/example.md @@ -0,0 +1,11 @@ +--- +title: Example Reference +description: A reference page in my new Starlight docs site. +--- + +Reference pages are ideal for outlining how things work in terse and clear terms. +Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting. + +## Further reading + +- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework |