Overview
The Astro Content Collections Docs Template is a template that utilizes the Content Collections API to automatically generate a documentation website based on markdown files. It creates a table of contents based on the folder structure of the content and converts headings in the markdown files into linkable sections. The template provides a recognizable layout with a table of contents on the left and a page-specific table of contents on the right. It also includes basic search functionality and automatic OG cards for each documentation page. The template is built with TailwindCSS and allows for customization of colors, fonts, and logos.
Features
- Automatic creation of a documentation website based on markdown files
- Generation of table of contents based on folder structure
- Conversion of headings in markdown files into linkable sections
- Classic layout with overall table of contents on the left and page-specific table of contents on the right
- Basic search functionality
- Automatic generation of OG cards for each documentation page
- Customizable colors, fonts, and logos
Installation
To use this template, follow the steps below:
- Download or clone the repository into a folder of your choice.
- Run
npm install / yarn install / pnpm installto install the dependencies. - Run
npm run dev / yarn dev / pnpm devto start the development server. - Start writing markdown files in the
contentfolder. You can create subfolders to organize your content. - When you’re ready to deploy, run
npm run build / yarn build / pnpm buildto build the site. The output will be in thedistfolder.
Summary
The Astro Content Collections Docs Template is a user-friendly template that simplifies the process of creating a documentation website. By leveraging the Content Collections API, it automatically generates a table of contents based on the folder structure of the content. The template also converts headings in markdown files into linkable sections, providing easy navigation for users. With additional features such as basic search functionality and automatic OG cards, the template offers a comprehensive solution for documentation needs. The ability to customize colors, fonts, and logos further enhances its flexibility. With this template, users can focus on writing content, while the template takes care of the rest.