| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository contains the documentation for Weaviate (vector database), Weaviate Cloud, and Query Agent. It's built with Docusaurus 3.
If you want to contribute to the documentation, follow these steps to get your local development environment set up.
# Install Node.js 22 and yarn
nvm install 22 && nvm use 22
npm install --global yarn
# Install dependencies and start dev server
yarn install
yarn start # Opens http://localhost:3000To make any changes to the documentation, edit the files in the /docs directory. The documentation is written in MDX, which allows you to use React components within markdown files.
Documentation lives in the /docs directory and maps directly to site URLs:
The docs are in the following directories:
They are rendered using the following mapping files:
Code examples use the FilteredTextBlock component to extract sections from full, runnable code files:
# START SectionName
# Your code here
# END SectionNameimport FilteredTextBlock from "@site/src/components/Documentation/FilteredTextBlock";
import PyCode from "!!raw-loader!/_includes/code/example.py";
<FilteredTextBlock
text={PyCode}
startMarker="# START SectionName"
endMarker="# END SectionName"
language="py"
/>This keeps code DRY and ensures examples are tested as complete, runnable scripts.
Run these checks locally to ensure your changes are ready:
# 1. Validate internal links
yarn build-dev
yarn validate-links-dev
# 2. Optional: Test affected code examples (if you modified code snippets)
# See README-tests.md for language-specific test commands
pytest tests/test_your_changes.py # Python examplesPre-submission checklist:
Weaviate uses Docusaurus 3 to build our documentation. Docusaurus is a static website generator that runs under Node.js. We use a Node.js project management tool called yarn to install Docusaurus and to manage project dependencies.
If you do not have Node.js and yarn installed on your system, install them first.
Use the nvm package manager to install Node.js. The nvm project page provides an installation script.
After you install nvm use it to install Node.js.
nvm install
By default, nvm installs the most recent version of Node.js. Also install the version of Node.js that is specified in .github/workflows/pull_requests.yaml. At the time of writing it is version v22.12.0.
nvm install 22 nvm use 22
Node.js includes the npm package manager. Use npm to install yarn.
npm install --global yarn
Once you have a local copy of the repository, you need to install Docusaurus and the other project dependencies.
Switch to the project directory, then use yarn to update the dependencies.
yarn install
You may see some warnings during the installation.
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
yarn start
Open http://localhost:3000/ showing the local build. If you close the terminal, the server will stop. Or press Ctrl+C/Cmd+C to stop the server.
This command generates static content into the build directory. You can use a hosting service to serve the static content.
yarn build
The build command is useful when you are finished editing. If you ran yarn start to start a local web server, you do not need to use yarn build to see you changes while you are editing.
This command generates static content into the build directory and can be served using any static contents hosting service.
Understanding the repository structure will help you navigate and contribute effectively:
/docs - Main documentation content (MDX files)
/_includes - Reusable content fragments
/src - Custom React components and theme customizations
/_build_scripts - Build automation and validation
/tests - Python test suite with Docker Compose configs
/tools - Python utilities for content validation and transformation
/static - Static assets (images, fonts, JavaScript files)
The site uses a multi-level navigation architecture:
The custom navbar (src/theme/Navbar/NavbarWrapper.js) provides:
To add new pages to navigation:
Version numbers are maintained in versions-config.json and automatically updated at build time via _build_scripts/update-config-versions.js (fetches from latest GitHub releases).
Use version variables in MDX files instead of hardcoding:
Install version ||site.weaviate_version||This prevents version numbers from becoming stale across the documentation.
Custom components are located in src/components/. Key components include:
To use a component in MDX:
import FilteredTextBlock from "@site/src/components/Documentation/FilteredTextBlock";
import PyCode from "!!raw-loader!/_includes/code/example.py";
<FilteredTextBlock
text={PyCode}
startMarker="# START SectionName"
endMarker="# END SectionName"
language="py"
/>Register new MDX components in src/theme/MDXComponents.js.
Code examples in _includes/code/ are validated via automated tests to ensure they work correctly. This includes:
For complete testing documentation, see README-tests.md.
# Start Weaviate test instances
tests/start-weaviate.sh
# Python tests
pytest
pytest tests/test_quickstart.py # Specific file
# Stop Weaviate test instances
tests/stop-weaviate.shBefore PRs are merged, internal links are validated to prevent broken links:
# Build dev site (with trailing slashes for validation)
yarn build-dev
# Validate links
yarn validate-links-devUse the <SkipValidationLink> component for intentionally external or placeholder links.
The site uses several plugins and integrations:
Swizzled Docusaurus components in src/theme/:
Styling in src/css/:
| Back | FazBrowse Home | New Git URL |