Merge branch 'main' into feature/singlemarkdown
This commit is contained in:
@@ -14,3 +14,4 @@ build:
|
||||
- cp -r build/html/* $READTHEDOCS_OUTPUT/html/
|
||||
- cp -r build/markdown/* $READTHEDOCS_OUTPUT/html/
|
||||
- cp build/singlemarkdown/index.md $READTHEDOCS_OUTPUT/html/llms-full.txt
|
||||
- cp -r build/rst/* $READTHEDOCS_OUTPUT/html/
|
||||
|
||||
+7
-1
@@ -27,11 +27,17 @@
|
||||
"configurePreset": "documentation",
|
||||
"targets": ["singlemarkdown"]
|
||||
},
|
||||
{
|
||||
"name": "rst",
|
||||
"displayName": "Build reStructuredText Documentation",
|
||||
"configurePreset": "documentation",
|
||||
"targets": ["rst"]
|
||||
},
|
||||
{
|
||||
"name": "docs-parallel",
|
||||
"displayName": "Build HTML and Markdown in parallel",
|
||||
"configurePreset": "documentation",
|
||||
"targets": ["html", "markdown", "singlemarkdown"]
|
||||
"targets": ["html", "markdown", "singlemarkdown", "rst"]
|
||||
}
|
||||
],
|
||||
"workflowPresets": [
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# Find Sphinx
|
||||
include(SphinxUtils)
|
||||
|
||||
setup_sphinx_environment()
|
||||
|
||||
# Add builder targets
|
||||
add_sphinx_builder(html)
|
||||
add_sphinx_builder(markdown)
|
||||
add_sphinx_builder(singlemarkdown)
|
||||
add_sphinx_builder(rst)
|
||||
|
||||
@@ -5,3 +5,4 @@ sphinx
|
||||
sphinx-llms-txt
|
||||
sphinxext-opengraph
|
||||
sphinx-markdown-builder @ git+https://github.com/akaihola/sphinx-markdown-builder.git@singlemarkdown
|
||||
sphinxcontrib-restbuilder
|
||||
|
||||
@@ -293,8 +293,8 @@ Your URI template can use the following variables:
|
||||
- ``{sourcelink_suffix}`` - The suffix from ``html_sourcelink_suffix`` configuration (e.g., ``.txt``)
|
||||
|
||||
.. tip::
|
||||
Instead of using the default of linking to ``_sources``, you can generate Markdown files from your documentation and link to those in ``llms.txt``.
|
||||
See this package's `CMake setup <https://github.com/jdillard/sphinx-llms-txt>`_ for an example of building both HTML and Markdown in parallel.
|
||||
Instead of using the default of linking to ``_sources``, you can generate Markdown and/or reStructuredText files from your documentation and link to those in ``llms.txt``.
|
||||
See this package's `CMake setup <https://github.com/jdillard/sphinx-llms-txt>`_ for an example of building both HTML and Markdown and/or reStructuredText in parallel.
|
||||
Note that ``_sources`` is still needed for ``llms-full.txt`` at this time.
|
||||
|
||||
.. _integration_examples:
|
||||
|
||||
@@ -15,6 +15,7 @@ import subprocess
|
||||
project = "sphinx-llms-txt"
|
||||
copyright = "Jared Dillard"
|
||||
author = "Jared Dillard"
|
||||
|
||||
llms_txt_uri_template = "{base_url}{docname}.md"
|
||||
llms_txt_full_file = False
|
||||
llms_txt_code_files = ["+:../../sphinx_llms_txt/*.py"]
|
||||
@@ -23,6 +24,9 @@ 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.
|
||||
"""
|
||||
|
||||
# This doesn't seem to be supported
|
||||
# rst_file_suffix = ".html.rst"
|
||||
|
||||
# check if the current commit is tagged as a release (vX.Y.Z)
|
||||
try:
|
||||
GIT_TAG_OUTPUT = subprocess.check_output(["git", "tag", "--points-at", "HEAD"])
|
||||
@@ -51,6 +55,7 @@ extensions = [
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx_contributors",
|
||||
"sphinx_llms_txt",
|
||||
"sphinxcontrib.restbuilder",
|
||||
]
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
|
||||
Reference in New Issue
Block a user