add singlemarkdown builder

This commit is contained in:
Jared Dillard
2025-10-28 00:02:39 -07:00
parent 1b08b2f362
commit 74c919c807
3 changed files with 14 additions and 8 deletions
+3 -1
View File
@@ -11,4 +11,6 @@ build:
- cmake --workflow --preset documentation-workflow - cmake --workflow --preset documentation-workflow
# Copy built documentation to Read the Docs output directory # Copy built documentation to Read the Docs output directory
- mkdir -p $READTHEDOCS_OUTPUT/html - mkdir -p $READTHEDOCS_OUTPUT/html
- cp -r build/* $READTHEDOCS_OUTPUT/html/ - 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
+10 -6
View File
@@ -7,18 +7,22 @@ set(SPHINX_BUILD ${CMAKE_BINARY_DIR})
# Build HTML documentation # Build HTML documentation
add_custom_target(html add_custom_target(html
COMMAND ${SPHINX_EXECUTABLE} -b html ${SPHINX_SOURCE} ${SPHINX_BUILD} COMMAND ${SPHINX_EXECUTABLE} -b html ${SPHINX_SOURCE} ${SPHINX_BUILD}/html
COMMENT "Building HTML documentation"
VERBATIM VERBATIM
) )
# Build markdown documentation # Build markdown documentation
add_custom_target(markdown add_custom_target(markdown
COMMAND ${SPHINX_EXECUTABLE} -b markdown ${SPHINX_SOURCE} ${SPHINX_BUILD} COMMAND ${SPHINX_EXECUTABLE} -b markdown ${SPHINX_SOURCE} ${SPHINX_BUILD}/markdown
COMMENT "Building Markdown documentation"
VERBATIM VERBATIM
) )
# Build both formats # Build singlemarkdown documentation and rename to llms-full.txt
add_custom_target(singlemarkdown
COMMAND ${SPHINX_EXECUTABLE} -b singlemarkdown ${SPHINX_SOURCE} ${SPHINX_BUILD}/singlemarkdown
VERBATIM
)
# Build all formats
add_custom_target(docs ALL) add_custom_target(docs ALL)
add_dependencies(docs html markdown) add_dependencies(docs html markdown singlemarkdown)
+1 -1
View File
@@ -4,4 +4,4 @@ sphinx-contributors
sphinx sphinx
sphinx-llms-txt sphinx-llms-txt
sphinxext-opengraph sphinxext-opengraph
sphinx-markdown-builder sphinx-markdown-builder @ git+https://github.com/akaihola/sphinx-markdown-builder.git@singlemarkdown