feat(docs): set up first guide page
This commit is contained in:
parent
77b53dbbda
commit
3358e7c805
6 changed files with 2803 additions and 171 deletions
|
@ -1,21 +1,25 @@
|
|||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
import { defineConfig } from 'astro/config'
|
||||
import starlight from '@astrojs/starlight'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
redirects: {
|
||||
'/': '/guides',
|
||||
},
|
||||
integrations: [
|
||||
starlight({
|
||||
title: 'My Docs',
|
||||
title: 'WCB',
|
||||
social: {
|
||||
github: 'https://github.com/withastro/starlight',
|
||||
npm: 'https://www.npmjs.com/package/web-component-base',
|
||||
sourcehut: 'https://sr.ht/~ayoayco/wcb/',
|
||||
},
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Guides',
|
||||
items: [
|
||||
// Each item here is one entry in the navigation menu.
|
||||
{ label: 'Example Guide', slug: 'guides/example' },
|
||||
{ label: 'Getting Started', slug: 'guides' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -25,4 +29,4 @@ export default defineConfig({
|
|||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Example Guide
|
||||
title: Getting Started
|
||||
description: A guide in my new Starlight docs site.
|
||||
---
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
title: Welcome to Starlight
|
||||
description: Get started building your docs site with Starlight.
|
||||
template: splash
|
||||
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="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>
|
|
@ -31,7 +31,8 @@
|
|||
"test": "vitest --run",
|
||||
"test:watch": "vitest",
|
||||
"demo": "npx simple-server .",
|
||||
"site": "pnpm --filter site start",
|
||||
"site": "pnpm -F site start",
|
||||
"docs": "pnpm -F docs start",
|
||||
"build": "pnpm run clean && tsc && pnpm run copy:source",
|
||||
"size-limit": "pnpm run build && size-limit",
|
||||
"clean": "rm -rf dist",
|
||||
|
|
2879
pnpm-lock.yaml
2879
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue