Creating Pages
Essentials
Creating Pages
Section titled “Creating Pages”Add new pages to your site by creating .md
or .mdx
files in src/content/docs/
. Use sub-folders to organize your files and to create multiple path segments.
Add Files
Section titled “Add Files”-
Create a new file in
src/content/docs/
calledhello-world.mdx
. -
Now you can navigate to
localhost:4321/hello-world
and see your newly created page. -
To add your page to your sidebar navigation, update
astro.config.mjs
with:export default defineConfig({...integrations: [starlight({sidebar: [label: 'Starmint',items: [{label: 'Hello world',slug: 'hello-world'}]]})]})
You can now navigate to localhost:4321/hello-world
to see your newly created page!
File Tree Preview
Section titled “File Tree Preview”Directorysrc
Directorycontent
Directorydocs
- hello-world.mdx