#Template docs

3 messages · Page 1 of 1 (latest)

paper portalBOT
#

Hi @left gazelle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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:

Astro Documentation

An intro to routing with Astro.

Astro

Astro is an all-in-one framework for building fast websites faster. Grab content from anywhere, deploy everywhere, and show the web what you've got.

Astro Documentation

Tips for migrating an existing Docusaurus project to Astro

#

@left gazelle kapa.ai is still learning and improving, please let us how it did by reacting below