Skip to main content

Edit documentation

OpenGateLLM uses Docusaurus to serve its documentation.

Installing and running the project

Documentation installation

Before you begin, make sure you have:

  • Node.js (version 18+ recommended)
  • npm (or yarn/pnpm) installed

Check your versions with:

node -v
npm -v

Install dependencies:

cd docs/
npm install

Running the development server

Start the local development server:

npm run start

This will:

Building for production

You can build the website with:

npm run build

The output will be in the build/ folder, which you can deploy to any static hosting service (Vercel, Netlify, GitHub Pages, etc.).

Project structure overview

The most importants files in the project are:

    docs/
├─ blog/ # Blog posts
├─ docs/ # Documentation pages
├─ src/ # Custom React components, pages, styles
│ ├─ components/ # Reusable React components
│ ├─ css/ # Custom Css
│ ├─ pages/ # Custom pages (e.g., about.js)
│ └─ theme/ # Custom theme
├─ static/ # Static assets (images, files)
│ └─ img/ # Images used in the markdown in docs
├─ docusaurus.config.js # Main configuration file
└─ sidebars.js # Defines sidebar navigation

Updating the documentation

Editing the markdown

You can add or modify content to the documentation by adding or modifying the files inside the docs docs/ folder. You can use either .md or mdx files.

Updating the documentation sidebar

If you add a file, you'll need to add your page to the sidebar.

In docs/sidebars.ts, add an item to tutorialSidebar:

  1. if your content is a single markdown (named my_documentation.md) outside a category, add:
{
type: 'doc',
id: 'my_documentation',
}
  1. if your content is a markdown (named my_documentation.md) inside a category (named my_category):
{
type: 'category',
label: 'my_category',
items: [
'my_documentation'
],
}

Warning: If your markdown (my_documentation.md) is in a subdirectory in docs (for instance functionalities), the id of your page will be functionalities/my_documentation

Customizing configuration

Open docusaurus.config.js to change:

  • Site title & tagline
  • Navbar & footer links
  • Theme colors
  • Deployment settings

Automatic documentation generation

warning

Some documentation is automatically generated from the codebase. Please do not edit the generated documentation files.

The following script is used to generate documentation:

Deploying documentation

When a file is modified in the docs folder, a new docker image of the documentation website is created here and the official documentation is automatically updated.