Skip to main content
Version: Next

Web (Documentation)

Repository: leia-org/web

The official LEIA documentation website. This contains the site you are reading right now. Built with Docusaurus 3, React 19, and TailwindCSS. Deployed to GitHub Pages at leia.ovh.


Tech Stack

TechnologyPurpose
Docusaurus 3Static site generator and documentation framework
React 19 + TypeScriptUI components and custom pages
TailwindCSS 3Utility-first styling
@tailwindcss/typographyProse styles for Markdown content
Framer MotionAnimations on the landing page
Mermaid.jsDiagram rendering inside docs
PrismCode syntax highlighting
Lucide ReactIcon library
MDXMarkdown with embedded React components
GitHub PagesHosting and deployment

Prerequisites

  • Node.js >= 18.x
  • npm

No environment variables are required for local development.


Project Structure

web/
├── docs/ # All documentation content (Markdown / MDX)
│ ├── img/ # Images organised by category
│ ├── introduction/ # Getting started docs
│ ├── installation/ # Simple guide to install and deploy LEIA
│ ├── tutorials/ # Step-by-step guides
│ └── contributing/ # This section
├── src/ # React source code
│ ├── components/ # Landing page components (Hero, Features, About…)
│ ├── css/
│ │ └── custom.css # Global styles (Tailwind imports + custom utilities)
│ ├── lib/
│ │ └── utils.ts # Shared utility functions
│ ├── pages/
│ │ └── index.js # Landing page entry point
│ └── theme/ # Swizzled Docusaurus components
│ ├── Footer/ # Custom footer
│ ├── Navbar/ # Custom navbar
│ └── NavbarItem/ # Custom navbar items
├── static/ # Static assets (logo, favicon, social card)
├── docusaurus.config.js # Main Docusaurus configuration
├── sidebars.js # Sidebar structure definition
├── tailwind.config.js # TailwindCSS configuration
└── package.json # Dependencies and npm scripts

Local Development

  1. Fork and clone the repository:

    git clone <your-fork-url>
    cd web
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm start

The site will be available at http://localhost:3000 with hot-reload enabled.


Available Scripts

ScriptCommandDescription
Dev servernpm startStart local dev server with hot-reload
Buildnpm run buildBuild the production-ready static site
Servenpm run serveServe the built site locally for testing
Deploynpm run deployBuild and push to the gh-pages branch
Clear cachenpm run clearDelete the Docusaurus build cache
Write translationsnpm run write-translationsGenerate i18n translation files
Write heading IDsnpm run write-heading-idsAuto-generate anchor IDs for headings
Lint Markdownnpm run lint:mdCheck Markdown files for style issues
Lint Markdown (fix)npm run lint:md:fixAuto-fix Markdown style issues
Version docsnpm run docs:version <version>Snapshot current docs as a new version

Adding or Updating Documentation

New Pages

  1. Create a .md or .mdx file inside the appropriate docs/ category folder.

  2. Add frontmatter at the top of the file:

    ---
    sidebar_position: 2
    ---
  3. Images go in docs/img/<category>/ and are referenced with relative paths:

    ![Alt text](../img/introduction/image.png)

Diagrams

Mermaid diagrams are supported out of the box. Use a fenced code block with the mermaid language tag:

```mermaid
graph LR
A[Designer] --> B[Runner]
B --> C[OpenAI]
```

Versioning

To snapshot the current docs as a new version:

npm run docs:version <version>

This creates a versioned_docs/version-<version>/ folder and adds the version to the version selector in the navbar.

Styling

  • Global styles live in src/css/custom.css.
  • Use predefined Tailwind classes and custom utilities such as .glass-card and .glass-panel.
  • Follow the LEIA brand: Vibrant Violet primary (#7c3aed), dark slate backgrounds.
  • Do not add inline styles. Use Tailwind classes or extend custom.css.

Contributing

  1. Fork the repository and create a branch off main:

    git checkout -b docs/my-change
  2. Follow the project structure above when adding new documentation pages or sections.

  3. Run the dev server and verify your changes locally before opening a PR:

    npm start
  4. Lint your Markdown files and fix any issues:

    npm run lint:md:fix
  5. Make sure the site builds without errors:

    npm run build
  6. Use Conventional Commits for your commit messages (docs:, feat:, fix:, etc.).

  7. Open a Pull Request. Include screenshots for any visual or layout changes.