atsphinx.toybox.pyproject

Note

Added by v2025.1.11

Overview

This is configuration loader from pyproject.toml.

Usage

Use case

Example workspace
/ProjectRoot
  - pyproject.toml
  - docs/
    - conf.py
  1. Write your coufiguration into pyproject.toml from conf.py.

    pyproject.toml
    # Root section is "tool.sphinx-build.YOUR_DOCUMENT_DIR"
    [tool.sphinx-build.docs]
    copyright = "2024, Kazuya Takei"
    
    # -- General configuration
    extensions = [
        # Set extensions...
    ]
    

    Important

    Currently, this supports TOML’s raw values.

  2. Write your coufiguration into pyproject.toml from conf.py.

    conf.py
    from atsphinx.toybox.pyproject import load
    
    load()
    
  3. Build like always.

    make html