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.txtfrom an existing set of.mdfiles.This function is entirely Sphinx-free.
- Parameters:
- md_rootstr or pathlib.Path
Root directory containing
.mdfiles (searched recursively).- base_urlstr, optional
Base URL prepended to each
.mdpath. Must behttp://orhttps://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.
Nonemeans unlimited.- full_contentbool, optional
When
True, embed each page’s Markdown content inline.
- Returns:
- pathlib.Path
Absolute path of the written
llms.txtfile.
- Raises:
- ValueError
If base_url is non-empty and uses a non-HTTP scheme.
- FileNotFoundError
If md_root does not exist.
- Parameters:
- Return type:
Examples
>>> generate_llms_txt_standalone( ... "/site/_build", ... base_url="https://docs.example.com", ... project_name="MyProject", ... ) PosixPath('/site/_build/llms.txt')