Skip to main content

llms-full.txt generator for Sphinx

Project description

Sphinx llms.txt generator

A Sphinx extension that generates a summary llms.txt file, written in Markdown, and a single combined documentation llms-full.txt file, written in reStructuredText.

Installation

pip install sphinx-llms-txt

Usage

  1. Add the extension to your Sphinx configuration (conf.py):
extensions = [
    'sphinx_llms_txt',
]

Configuration Options

llms_txt_full_file

  • Type: boolean
  • Default: 'True
  • Description: Whether to write the single output file

llms_txt_full_filename

  • Type: string
  • Default: 'llms-full.txt'
  • Description: Name of the single output file

llms_txt_full_max_size

  • Type: integer or None
  • Default: None (no limit)
  • Description: Sets a maximum line count for llms_txt_full_filename. If exceeded, the file is skipped and a warning is shown, but the build still completes.

llms_txt_file

  • Type: boolean
  • Default: True
  • Description: Whether to write the summary information file

llms_txt_filename

  • Type: string
  • Default: llms.txt
  • Description: Name of the summary information file

llms_txt_directives

  • Type: list of strings
  • Default: [] (empty list)
  • Description: List of custom directive names to process for path resolution.

llms_txt_title

  • Type: string or None
  • Default: None
  • Description: Overrides the Sphinx project name as the heading in llms.txt.

llms_txt_summary

  • Type: string or None
  • Default: None
  • Description: Optional, but recommended, summary description for llms.txt.

Features

  • Creates llms.txt and llms-full.txt
  • Automatically add content from include directives
  • Resolves relative paths in directives like image and figure to use full paths
    • Ability to add list of custom directives with llms_txt_directives
    • Optionally, prepend a base URL using Sphinx's html_baseurl

License

MIT License - see LICENSE file for 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_llms_txt-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

sphinx_llms_txt-0.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_llms_txt-0.2.0.tar.gz.

File metadata

  • Download URL: sphinx_llms_txt-0.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sphinx_llms_txt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 842e446c5e5d131554fb525a137ee1f25ddee689c05122bbeb9208d4c08f780b
MD5 8050686daa5eba76e036dd37760806df
BLAKE2b-256 86452a40a9edb4c5f0c57af276c36f5bc49197607787706da9a17350bfed721b

See more details on using hashes here.

File details

Details for the file sphinx_llms_txt-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_llms_txt-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c27579dbd0ba4ede9e19914f73f9e54e31532d5ce8195a05201718704dcafa80
MD5 83d9d5a6d8b02aadcec0d85bf6dfd484
BLAKE2b-256 93f65b300834bf2cee5ec00376c8c11f0ac1cb807ca22964ab4223eb06fdab49

See more details on using hashes here.

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