Build the documentation¶
The documentation site uses Zensical and the existing Markdown files in docs/. Its commented configuration is in zensical.toml. The Python API is generated directly from src/gdelt_regkg during each build.
Preview locally¶
From the repository root, with Python 3.12 or newer and uv installed:
Open http://127.0.0.1:8000/gdelt-regkg/. The server rebuilds when documentation or watched Python sources change. Stop it with Ctrl+C.
The docs dependency group installs Zensical and the Python documentation handler. --inexact preserves tools and optional dependencies already installed in your development environment. Documentation builds use static source inspection and do not need dictionaries, spaCy models, translation weights or the library's optional extras.
Run the CI checks locally¶
uv run --no-sync python .github/scripts/check_docs.py
uv run --no-sync zensical build --clean --strict
The first command checks repository Markdown links, heading anchors, Python/JSON examples and PyPI README link portability. The second creates the deployable site in site/ and fails on Zensical warnings, including broken internal links and anchors. Generated output and caches are ignored by Git.
Publish on GitHub Pages¶
In the repository's Settings → Pages → Build and deployment, select GitHub Actions as the source. Commit and push the documentation configuration and workflow to the default branch. The site will be available at https://octo-gone.github.io/gdelt-regkg/ after the first successful deployment.
The Documentation workflow checks and builds documentation on relevant pull requests and pushes to main or master. You can also start it with Run workflow. Only a successful build on the repository's default branch is deployed; pull requests and manual runs on other branches produce a downloadable Pages artifact for inspection. Deployment uses GitHub's token and Pages environment, with no personal access token or gh-pages branch.
Maintain the configuration¶
- Add authored pages to
navinzensical.toml. Keep the Global Knowledge Graph (GKG) field pages in wire-column order. - Keep relative Markdown links and
README.mddirectory indexes so the source is readable on GitHub. - API pages are generated by
api-autonavandmkdocstrings. Adjust the source-module exclusions and Python handler options in the configuration. Do not commit generated API Markdown or HTML. - Search, GitHub alerts, HTML minification and API cross-references use Zensical's supported plugin implementations. Do not add unsupported MkDocs plugins: Zensical silently ignores them.
- If the repository name, owner or default branch changes, update
site_url, repository/edit links and the package's documentation URL. A custom domain also needs a matchingsite_urland GitHub Pages settings.