Creating Pages
Essentials
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
-
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:
You can now navigate to localhost:4321/hello-world
to see your newly created page!
File Tree Preview
Directorysrc
Directorycontent
Directorydocs
- hello-world.mdx