generate_llms_txt#

scikitplot._externals._sphinx_ext._sphinx_ai_assistant.generate_llms_txt(app, exception)[source]#

Post-build hook: write llms.txt listing all generated .md URLs.

Registered with Sphinx’s build-finished event in setup.

Parameters:
appsphinx.application.Sphinx

The active Sphinx application instance.

exceptionException or None

When not None, the hook exits immediately.

Returns:
None
Parameters:
  • app (Sphinx)

  • exception (Optional[Exception])

Return type:

None

Notes

The base URL is resolved from, in priority order:

  1. html_baseurl (standard Sphinx config).

  2. ai_assistant_base_url (extension-specific override).

  3. Empty string — relative paths are used.

Config values read from app.config:

  • ai_assistant_generate_llms_txt — master switch.

  • ai_assistant_llms_txt_max_entries — cap the number of entries written (None → unlimited).

  • ai_assistant_llms_txt_full_content — when True, embed the full Markdown content of each page inline in llms.txt (llms-full.txt convention).

References