Getting Started
Installation
Start a Lotus documentation site from the starter template or add Lotus to an existing Astro project.
Start from the Lotus starter template for a new documentation site, or install Lotus manually when you already have an Astro project.
Use the starter template
Scaffold a working Lotus site with Astro, content collections, theme config, and example docs already connected.
Set up manually
Add Lotus to an existing Astro project and keep full control over the file structure.
Starter Template
Use the starter when you want the fastest path to a working site.
pnpm create astro@latest my-docs --template prosefly/astro-template-lotus-startercd my-docspnpm devThe template source is available at prosefly/astro-template-lotus-starter.
After the site is running, replace the example content and update
src/theme.config.ts with your project name, navigation, sidebar structure,
appearance, footer, and source repository.
Manual Setup
Use manual setup when your project already exists or when you want to introduce Lotus one piece at a time.
-
Install Lotus.
Add the theme package to your Astro project.
Terminal window pnpm add @prosefly/astro-theme-lotusInstall
@prosefly/astro-componentsdirectly when your own MDX or Astro files import shared components such as cards, steps, tabs, callouts, badges, or file trees.Terminal window pnpm add @prosefly/astro-components -
Register the integration.
Configure Astro with the Lotus integration.
astro.config.ts import { defineConfig } from 'astro/config';import lotus from '@prosefly/astro-theme-lotus';import themeConfig from './src/theme.config';export default defineConfig({integrations: [lotus(themeConfig)],}); -
Create the theme config.
Start with project identity and a minimal sidebar.
src/theme.config.ts import { defineLotusConfig } from '@prosefly/astro-theme-lotus';export default defineLotusConfig({name: 'My Docs',description: 'Documentation for my project.',navbar: [{ label: 'Docs', href: '/' }],sidebars: [{label: 'Guides',icon: 'lucide:rocket',items: ['index'],},],});Set
docsBase: '/docs'when the Astro project already has a site home page and docs should live under/docs/. -
Register the docs collection.
Create
src/content.config.tsand use the loader and schema from Lotus.src/content.config.ts import { defineCollection } from 'astro:content';import { docsLoader, docsSchema } from '@prosefly/astro-theme-lotus/content';const docs = defineCollection({loader: docsLoader(),schema: docsSchema(),});export const collections = { docs }; -
Add the first docs page.
Lotus reads from
src/content/docsby default.src/content/docs/index.mdx ---title: Overviewdescription: Start here.---Welcome to the docs. -
Start development.
Terminal window pnpm dev
Next Steps
- Review Project Configuration to define the site identity, navigation, sidebars, footer, and source repository.
- Review Content Routing before moving docs under a route prefix or changing the docs loader base.
- Run
pnpm checkbefore shipping changes. It validates content collections, MDX imports, Astro components, and TypeScript.