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.

PyPI version Downloads

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: []
  • 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.2.tar.gz (17.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.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_llms_txt-0.2.2.tar.gz
  • Upload date:
  • Size: 17.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.2.tar.gz
Algorithm Hash digest
SHA256 e0a1f35f1b11ddfb756a10f313e32ef72aa621c330a1f39a827fd3c0eca61b97
MD5 94e35fdae9476404e0d158b0a80c58f5
BLAKE2b-256 3cfd2598e9f4e6621eff3e0cc2c4f667461c10c2f8e029d447a75b33b81f4f07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_llms_txt-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d41f0a1e1566c6d61160f53a5b202c611b26379c2ef5581dad6160f5d710aaa
MD5 c1f377f81381f1d09d31dec2dd67123c
BLAKE2b-256 2e443e4324cb8d894438977a38606969d405214051fdc6f89f799592ccb16ab7

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