generate_llms_txt_standalone#

scikitplot._externals._sphinx_ext._sphinx_ai_assistant.generate_llms_txt_standalone(md_root, *, base_url='', output_file=None, project_name='Documentation', max_entries=None, full_content=False)[source]#

Write llms.txt from an existing set of .md files.

This function is entirely Sphinx-free.

Parameters:
md_rootstr or pathlib.Path

Root directory containing .md files (searched recursively).

base_urlstr, optional

Base URL prepended to each .md path. Must be http:// or https:// if non-empty.

output_filestr or pathlib.Path or None, optional

Explicit path for the output file. Defaults to <md_root>/llms.txt.

project_namestr, optional

Project name written in the file header.

max_entriesint or None, optional

Cap on the number of entries. None means unlimited.

full_contentbool, optional

When True, embed each page’s Markdown content inline.

Returns:
pathlib.Path

Absolute path of the written llms.txt file.

Raises:
ValueError

If base_url is non-empty and uses a non-HTTP scheme.

FileNotFoundError

If md_root does not exist.

Parameters:
Return type:

Path

Examples

>>> generate_llms_txt_standalone(
...     "/site/_build",
...     base_url="https://docs.example.com",
...     project_name="MyProject",
... )
PosixPath('/site/_build/llms.txt')