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.mdx

Special Folders

FolderPurposeSynced To
_landing/Custom landing page (HTML/CSS/JS)Generates index.astro
_assets/Static files (PDFs, downloads)public/assets/
_images/Imagespublic/images/
_css/Custom stylesheetssrc/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.mdx is your site’s homepage (/).
  • Sub-folder index.mdx files (e.g., getting-started/index.mdx) are accessible at that route (/getting-started).

Frontmatter

Every markdown file must have a frontmatter block at the top:

---
title: Page Title
description: A short description for SEO and search.
---