I Hate Webdev, How Do I Add a Page
This docs site is built with Astro Starlight. Pages are just Markdown files. You don’t need to know any web stuff.
1. Create a Markdown file
Section titled “1. Create a Markdown file”Add a .md file under src/content/docs/ wherever appropriate:
src/content/docs/ general/ # general tutorials teleop/ # teleop docs navigation/ # nav docs perception/ # perception docs ...2. Add frontmatter
Section titled “2. Add frontmatter”Every page needs a title in the frontmatter at the top:
---title: "My New Page"---
## A section
- bullets[links](https://mrover.org)
```bashcode blocks## 3. Add it to the sidebar
Open `astro.config.mjs` and find the `sidebar` array. Locate the section your page belongs to and add an entry:
```js{ label: 'Navigation', collapsed: true, items: [ { label: 'Navigation', slug: 'navigation/overview' }, { label: 'My New Page', slug: 'navigation/my-new-page' }, // add this ],},The slug matches the file path under src/content/docs/ without the .md extension.
4. Preview locally
Section titled “4. Preview locally”cd ~/mrover-docsbun install # first time onlybun run devOpen localhost:4321 in your browser
Extras
Section titled “Extras”Images
Section titled “Images”Put images in public/ and reference them:
Objects in public will be built to root, so reference them from root.
Admonitions
Section titled “Admonitions”GitHub-flavored > [!NOTE] syntax does not work here. Use Starlight’s ::: syntax:
:::noteThis is a note.:::
:::cautionThis is a warning.:::
:::tipThis is a tip.:::