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.

llms_txt_exclude

  • Type: list of strings
  • Default: []
  • Description: A list of pages to ignore (e.g., "page1", "page_with_*").

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
  • Ability to exclude pages

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.1.tar.gz (15.0 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.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_llms_txt-0.2.1.tar.gz
  • Upload date:
  • Size: 15.0 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.1.tar.gz
Algorithm Hash digest
SHA256 b5cff276bb637b4368ff6074d3579161b9888fcd6c0778709f37c08a8f3ce065
MD5 787a6e7b298dc99274f0f2c294bc3dbe
BLAKE2b-256 8f4d39d05aed2a68a2e8a09b5905adfc0bfd2f4e25a20efc84f3f61dfea18d62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_llms_txt-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 021cd20397a853a074ca6adedddbdd0a96a8f1564a0333771e3c257674b94edc
MD5 09a731c1ebbcdc4285b55f92d1d1df1e
BLAKE2b-256 52756af4227db7fce69126e1659b0f6f4b03d35027e6572720862a0a3730f635

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