Project Structure
When you run lito dev or lito build, the CLI processes your input folder and generates a full Astro project. Here’s what your input folder should look like:
my-docs/├── docs-config.json # Global configuration├── index.mdx # Homepage (or use _landing/)├── _landing/ # Custom landing page (optional)│ ├── index.html # Landing HTML│ ├── styles.css # Landing styles│ └── script.js # Landing scripts├── _assets/ # Static assets → /assets/├── _images/ # Images → /images/├── _css/ # Custom CSS → src/styles/├── public/ # Public files → root├── getting-started/ # A folder for a section│ ├── index.mdx # Section landing page (optional)│ └── setup.mdx # Content page└── api/ └── endpoints.mdxSpecial Folders
| Folder | Purpose | Synced To |
|---|---|---|
_landing/ | Custom landing page (HTML/CSS/JS) | Generates index.astro |
_assets/ | Static files (PDFs, downloads) | public/assets/ |
_images/ | Images | public/images/ |
_css/ | Custom stylesheets | src/styles/ |
public/ | Public files (favicon, robots.txt) | public/ |
Key Files
docs-config.json
This is the brain of your documentation site. It controls:
- Navigation: The sidebar structure.
- Branding: Logo, favicon, colors.
- Landing: Landing page configuration.
- SEO: Meta tags, OpenGraph images.
- Integrations: Analytics, etc.
index.mdx
Every folder can have an index.mdx file.
- The root
index.mdxis your site’s homepage (/). - Sub-folder
index.mdxfiles (e.g.,getting-started/index.mdx) are accessible at that route (/getting-started).
Tip
If you create a _landing/ folder with custom HTML, it takes precedence over index.mdx for the homepage.
Frontmatter
Every markdown file must have a frontmatter block at the top:
---title: Page Titledescription: A short description for SEO and search.---Was this page helpful?