Skip to main content

Sphinx extension that generates an AI-readable documentation index

Project description

sphinx-ai-index

A Sphinx extension that generates an AI-readable documentation index (ai_docs_index.json) in the HTML output directory on every build.

Installation

Install from PyPI:

pip install sphinx-ai-index

Or add it to your pyproject.toml:

dependencies = [
    "sphinx-ai-index",
]

Usage

Add the extension to your Sphinx conf.py:

extensions = ["sphinx_ai_index"]

That's it. On the next HTML build, ai_docs_index.json will appear in the output directory.

.. page-summary:: directive

Optionally annotate any RST page with a short prose description:

.. page-summary::

    This page covers the installation of the package on all major platforms,
    including system requirements and VS Code extension setup.

Pages without the directive are still indexed; their summary field will be an empty string.

Output format

ai_docs_index.json is written to the HTML output directory:

{
  "version": "1.0",
  "pages": [
    {
      "rst_source_path": "_sources/basics/installation.rst.txt",
      "html_path": "basics/installation.html",
      "title": "Installation",
      "sections": ["System Requirements", "Installing via pip"],
      "summary": "Covers installation on all platforms."
    }
  ]
}
Field Description
rst_source_path Path to the RST source in the HTML output (under _sources/)
html_path Path to the rendered HTML page, relative to the output root
title Page title
sections Titles of the top-level subsections within the page
summary Text from the .. page-summary:: directive, or ""

Development

git clone https://github.com/useblocks/sphinx-ai-index.git
cd sphinx-ai-index
rye sync
rye run tox

See CONTRIBUTING.md for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_ai_index-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_ai_index-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_ai_index-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_ai_index-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_ai_index-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a75361b11b5f95ab00bd0eb86b72790e36d4322105471ffd16a053739938ef2
MD5 24c3746c8e8c40dd251ea7201412b729
BLAKE2b-256 1bd3be55867acd9e732469d4bef856498fc92cc3a60bfb4d354e000d7d2d9b52

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_ai_index-0.1.0.tar.gz:

Publisher: release.yml on useblocks/sphinx-ai-index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_ai_index-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_ai_index-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69dbf3e208fa5c2c834808389b7660be03483f574ca0fabb75d9089b9cfd8711
MD5 b257c472629e46c763393e7134208294
BLAKE2b-256 14984d9f9b09a135e1afb3c682b52669c2750245b531a17a54b9dcb10eeb491d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_ai_index-0.1.0-py3-none-any.whl:

Publisher: release.yml on useblocks/sphinx-ai-index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page