This repository contains the source files for the Spice.ai OSS documentation website.
To view the published documentation, visit https://docs.spiceai.org (opens in a new tab).
To contribute to the documentation, follow the instructions below to set up a local development environment.
The Spice docs are built with Docusaurus (opens in a new tab) and hosted on Cloudflare Pages (opens in a new tab). The Deployment (opens in a new tab) section describes how changes are published.
The website (opens in a new tab) directory contains the Docusaurus project, markdown files, and theme configurations.
Docusaurus is installed as a project dependency and does not need to be installed globally.
website directory.http://localhost:3000/ in a browser. The local documentation site should appear, and changes to markdown files are reflected automatically.Fork this repository to your GitHub account.
Clone your fork and create a new branch:
Make changes to the markdown files in website/docs/.
Commit and push your changes:
Open a pull request from your branch to the trunk branch of the upstream repository.
GitHub Actions builds the pull request. For a pull request from a branch in this repository, it also deploys a preview site and links it in a pull request comment. Pull requests from forks are built but not deployed (see Deployment (opens in a new tab)).
The build_and_publish (opens in a new tab) workflow builds the site in GitHub Actions and uploads website/build to the spiceai-org-website Cloudflare Pages project with wrangler pages deploy (opens in a new tab). A push to trunk deploys to production at spiceai.org (opens in a new tab) and starts an Algolia search reindex. For a pull request, the workflow deploys a preview and comments its URL on the pull request. Pull requests from forks are built but not deployed, because GitHub does not pass secrets (opens in a new tab), such as the Cloudflare API token, to workflows triggered from a fork.
The repository is also connected to the Cloudflare Pages project, but Cloudflare's automatic Git deployments (opens in a new tab) are turned off (the project's deployments_enabled setting is false), so GitHub Actions is the only deploy path. If automatic deployments are turned back on, every Cloudflare build fails with ENOENT: no such file or directory, open '/opt/buildhome/repo/package.json', because the project's root directory (opens in a new tab) is empty and the Docusaurus project is in website/.
To build in Cloudflare instead, set the project's root directory to website and its NODE_VERSION (opens in a new tab) environment variable to 24, and turn automatic Git deployments back on. Then change the workflow: