#Template docs
3 messages · Page 1 of 1 (latest)
To create a documentation site using Astro with the "docs" template, you can use the create astro command with the --template argument. Here's how to do it with different package managers:
npm:
npm create astro@latest -- --template docs
pnpm:
pnpm create astro@latest --template docs
Yarn:
yarn create astro --template docs
Source: Migrating from Docusaurus (https://docs.astro.build/en/guides/migrate-to-astro/from-docusaurus#switch-from-docusaurus-to-astro)
After setting up the project, you can add your existing content files to create pages using Markdown or MDX. You can take advantage of file-based routing (https://docs.astro.build/en/core-concepts/routing/) by copying these documents directly into src/pages/ in Astro. Create folders with names that correspond to your existing project, and you should be able to keep your existing URLs.
Source: Migrating from Docusaurus (https://docs.astro.build/en/guides/migrate-to-astro/from-docusaurus#switch-from-docusaurus-to-astro)
As for automatically displaying the pages in the sidebar, the official docs theme and some community docs themes in the theme showcase (https://astro.build/themes?search=&categories[]=docs) may have built-in features for this. You can explore these themes and choose one that fits your needs.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@left gazelle kapa.ai is still learning and improving, please let us how it did by reacting below