The Documentation System manages the generation, building, and deployment of comprehensive documentation for the OpenDAL project. This system orchestrates documentation from multiple language bindings, integration projects, and the core Rust library into a unified website using Docusaurus as the static site generator.
This page covers the technical infrastructure for documentation generation and deployment. For information about the CI/CD pipeline that triggers documentation builds, see CI/CD Pipeline. For details about the actual documentation content structure, see Development Guide.
The documentation system follows a multi-stage build pipeline that collects documentation from various sources and combines them into a single deployable website.
Sources: .github/workflows/docs.yml46-720 website/docusaurus.config.js88-152
The documentation build process is orchestrated through GitHub Actions with multiple parallel jobs for different documentation sources.
Sources: .github/workflows/docs.yml47-516
Each documentation build job follows a consistent pattern:
RUSTDOCFLAGS="--cfg docsrs"
for feature gates and documentation-specific featuresjavadoc:javadoc
goal with Temurin JDK 17Sources: .github/workflows/docs.yml69-74 .github/workflows/docs.yml92-94 .github/workflows/docs.yml129-131
The website is built using Docusaurus 2 with extensive customization for multi-language documentation.
Sources: website/docusaurus.config.js40-286
The Docusaurus configuration includes several environment-specific customizations:
semver
parsingSources: website/docusaurus.config.js30-38 website/docusaurus.config.js49-68
The documentation system includes a custom plugin for processing external images to ensure reliable offline access and faster loading.
The plugin processes both HTML files and JavaScript bundles to ensure all external image references are localized:
src
attributesSources: website/plugins/image-ssr-plugin.js27-233
The documentation system supports multiple deployment targets based on the trigger event:
peaceiris/actions-gh-pages
to deploy to the gh-pages
branch with force orphan commitssite/*-staging
OPENDAL_WEBSITE_BASE_URL
, OPENDAL_WEBSITE_NOT_LATEST
, and OPENDAL_WEBSITE_STAGING
for customizationSources: .github/workflows/docs.yml637-719 website/docusaurus.config.js275-283
The build system manages documentation artifacts through GitHub Actions artifacts:
Artifact Name | Source | Build Tool | Output Path |
---|---|---|---|
rust-docs | core/ | cargo doc | ./core/target/doc |
java-docs | bindings/java | mvn javadoc | ./bindings/java/target/site/apidocs |
nodejs-docs | bindings/nodejs | pnpm docs | ./bindings/nodejs/docs |
python-docs | bindings/python | mkdocs build | ./bindings/python/site |
ruby-docs | bindings/ruby | rake doc | ./bindings/ruby/doc |
C-docs | bindings/c | make doc | ./bindings/c/docs/doxygen/html |
lua-docs | bindings/lua | ldoc | ./bindings/lua/doc/ |
haskell-docs | bindings/haskell | cabal haddock | ./bindings/haskell/doc/ |
cpp-docs | bindings/cpp | cmake + ninja | ./bindings/cpp/build/docs_doxygen/html |
ocaml-docs | bindings/ocaml | dune build @doc | ./bindings/ocaml/_build/default/_doc/_html |
Each artifact is downloaded to a specific path under ./website/static/docs/
during the website build process, making them accessible through the final website's URL structure.
Sources: .github/workflows/docs.yml536-594
The documentation system integrates with Apache Software Foundation infrastructure through the .asf.yaml
configuration:
gh-pages
branchautostage: site/*
patternSources: .asf.yaml55-61 .asf.yaml49-53