|
1 | | -# Starlight Starter Kit: Basics |
| 1 | +# BDT Docs |
2 | 2 |
|
3 | | -[](https://starlight.astro.build) |
| 3 | +How to contribute to the docs |
4 | 4 |
|
5 | | -``` |
6 | | -npm create astro@latest -- --template starlight |
7 | | -``` |
| 5 | +## Setup |
8 | 6 |
|
9 | | -> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! |
| 7 | +`cd docs/` |
10 | 8 |
|
11 | | -## 🚀 Project Structure |
| 9 | +`npm install` |
12 | 10 |
|
13 | | -Inside of your Astro + Starlight project, you'll see the following folders and files: |
| 11 | +`npm run dev` |
14 | 12 |
|
15 | | -``` |
16 | | -. |
17 | | -├── public/ |
18 | | -├── src/ |
19 | | -│ ├── assets/ |
20 | | -│ ├── content/ |
21 | | -│ │ └── docs/ |
22 | | -│ └── content.config.ts |
23 | | -├── astro.config.mjs |
24 | | -├── package.json |
25 | | -└── tsconfig.json |
26 | | -``` |
| 13 | +## Docs Pages |
27 | 14 |
|
28 | | -Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. |
| 15 | +Each page in the docs is a markdown file located at content/docs/... |
29 | 16 |
|
30 | | -Images can be added to `src/assets/` and embedded in Markdown with a relative link. |
| 17 | +To edit a docs page, simply edit the markdown file. |
31 | 18 |
|
32 | | -Static assets, like favicons, can be placed in the `public/` directory. |
33 | | - |
34 | | -## 🧞 Commands |
35 | | - |
36 | | -All commands are run from the root of the project, from a terminal: |
37 | | - |
38 | | -| Command | Action | |
39 | | -| :------------------------ | :----------------------------------------------- | |
40 | | -| `npm install` | Installs dependencies | |
41 | | -| `npm run dev` | Starts local dev server at `localhost:4321` | |
42 | | -| `npm run build` | Build your production site to `./dist/` | |
43 | | -| `npm run preview` | Preview your build locally, before deploying | |
44 | | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | |
45 | | -| `npm run astro -- --help` | Get help using the Astro CLI | |
46 | | - |
47 | | -## 👀 Want to learn more? |
48 | | - |
49 | | -Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). |
| 19 | +To add a docs page, add a markdown file in the appropriate directory (`user/` for user-facing pages or `dev/` for developer-facing pages). The file must include [frontmatter](https://www.markdownlang.com/advanced/frontmatter.html) with `title` and `description` fields. In `astro.config.mjs`, add an item to the sidebar in the appropriate location to add your page to the sidebar. |
0 commit comments