Installation
Getting started with Lito is straightforward and fast. Whether you want to try it out immediately or integrate it into your project, we’ve got you covered.
Prerequisites
- Node.js: Version 18.0.0 or higher
- npm, yarn, or pnpm package manager
Installation Methods
Global Installation
Install Lito globally to use it across multiple projects:
npm install -g @litodocs/cli# orpnpm add -g @litodocs/cliThen use it anywhere:
lito build -i ./my-docs -o ./distlito dev -i ./my-docsMethod 1: The Quickest Way (npx)
If you just want to spin up a docs site from an existing folder of markdown files without installing anything:
npx @litodocs/cli dev -i ./my-docs-folderThis command will:
- Scaffold a temporary Astro project
- Copy your docs into it
- Start a local development server at
http://localhost:4321
Method 2: Adding to an Existing Project
If you want to keep your docs versioned with your code:
- Create a
docsfolder in your repository - Add a
docs-config.jsonfile inside it - Add Markdown or MDX files
- Run from your root:
npx @litodocs/cli dev -i ./docsMethod 3: Using a Custom Template
You can use custom templates from GitHub or local paths:
npx @litodocs/cli dev -i ./docs -t github:owner/template-repo# ornpx @litodocs/cli dev -i ./docs -t ./path/to/local/templateNext Steps
After installation, explore these resources:
- Quick Start - Get up and running in 5 minutes
- Project Structure - Understand the file organization
- CLI Commands - Full reference for all available commands and flags