[docs] Demo all format options (#60)

This commit is contained in:
Jared Dillard
2025-12-08 00:40:59 -08:00
committed by GitHub
parent 8254002622
commit 61f9b38d4d
5 changed files with 77 additions and 7 deletions
-1
View File
@@ -16,7 +16,6 @@ project = "sphinx-llms-txt"
copyright = "Jared Dillard"
author = "Jared Dillard"
llms_txt_uri_template = "{base_url}{docname}.html.md"
llms_txt_code_files = ["+:../../sphinx_llms_txt/*.py"]
llms_txt_summary = """
A Sphinx extension that generates a summary llms.txt file,written in Markdown,
+11 -5
View File
@@ -34,6 +34,8 @@ After the HTML finishes building, **sphinx-llms-txt** will output the location o
sphinx-llms-txt: Created /path/to/_build/html/llms-full.txt with 45 sources and 6879 lines
sphinx-llms-txt: created /path/to/_build/html/llms.txt
.. _choosing-output-format:
Choosing an Output Format
-------------------------
@@ -45,17 +47,21 @@ For optimal LLM support, see the alternative builders below and the :ref:`CMake
:widths: 18 27 27 27
* -
- Default (no config)
- Markdown (CMake)
- RST (CMake)
- Default
- Markdown
- reStructuredText
* - **Setup**
- No config
- CMake
- CMake
* - **Builder**
- Native [#native]_
- `sphinx-markdown-builder`_
- `sphinxcontrib-restbuilder`_
* - **Format**
- Raw RST source
- Raw reStructuredText source
- Rendered Markdown [#rendered]_
- Rendered RST [#rendered]_
- Rendered reStructuredText [#rendered]_
* - **LLM Readability**
- Good - preserves structure for simple syntax
- Excellent - native LLM format
+5 -1
View File
@@ -8,7 +8,9 @@ A `Sphinx`_ extension that generates a summary ``llms.txt`` file, written in Mar
Demo
----
You can see this Sphinx project's `llms.txt`_ and `llms-full.txt`_ files as a simple example.
This Sphinx project's `llms.txt`_ and `llms-full.txt`_ files as an example of the default output format.
Alternative :ref:`output formats <choosing-output-format>` are also available. For example: `Markdown`_ and `reStructuredText`_.
Highlights
----------
@@ -36,6 +38,8 @@ Highlights
.. _llms.txt: https://sphinx-llms-txt.readthedocs.io/en/latest/llms.txt
.. _llms-full.txt: https://sphinx-llms-txt.readthedocs.io/en/latest/llms-full.txt
.. _Markdown: https://sphinx-llms-txt.readthedocs.io/en/latest/llms.md.txt
.. _reStructuredText: https://sphinx-llms-txt.readthedocs.io/en/latest/llms.rst.txt
.. _Sphinx: http://sphinx-doc.org/
.. |PyPI version| image:: https://img.shields.io/pypi/v/sphinx-llms-txt.svg