Project structure
Every DocsLit project follows a simple, flat structure. There are no deeply nested configuration directories or framework-specific folders.
Directory layout
Key files and directories
.md file becomes a page on your site. The filename (without extension) is the page slug used in URLs.<wc-include />. Include targets must live under this directory..js file here is automatically loaded alongside the built-in components.docslit build. Deploy this directory to any static hosting provider.Projects without a config file
A project needs only a docs/ folder of .md files. build, dev, validate, lint and mcp run without docslit.json, using an automatic sidebar (the same as "sidebar": "auto") and the folder name as the site name. Commands that write config, such as docslit new and docslit theme use, need a real docslit.json. Without a docs/ folder, the error tells you that a docs/ folder also works. Run docslit init for a project with a config file.
Configuration file
The docslit.json file controls your site's name, description, and sidebar navigation:
llms.txt for AI discovery.sitemap.xml and llms.txt.group name and a pages array of page slugs. The order defines the sidebar navigation and pagination.message string and optional type and dismissible fields. See announcement banner.peppermint, frond, tonal, folio, ledger or default), a palette name (e.g. ocean), a path to a brand theme JSON file (e.g. ./brand-theme.json), or an inline theme object with name, palette, colors, fonts, radius, appearance and strict. See Themes.spec and overlay keys. Enables spec-driven API reference generation. See OpenAPI integration for details.packages (package names, with data in api/python/<name>.json), docstringStyle (google, numpy or sphinx) and options (default options for ::: directives). See Python API reference.true to generate an Open Graph image for every page at build time. Off by default. Pages keep their og:title and og:description tags either way. A page can opt out with ogImage: false in its frontmatter.Page slugs
Page slugs are the filenames without the .md extension. They determine the URL path for each page.
| File path | Slug | URL |
|---|---|---|
docs/introduction.md |
introduction |
/introduction |
docs/getting-started.md |
getting-started |
/getting-started |
docs/api-reference.md |
api-reference |
/api-reference |
getting-started displays as "Getting Started".Build output
When you run docslit build, the dist/ directory contains:
url is set in your configuration.sitemap.xml.Next steps
- Learn how to write content in Markdown basics
- Configure page metadata with frontmatter
- Understand pages and navigation to structure your sidebar