From 8ad50b073291ff295cb3e87dbcbb225b024bda10 Mon Sep 17 00:00:00 2001 From: Adam Fish Rybicki Date: Wed, 24 Jun 2026 12:21:51 +0200 Subject: [PATCH 1/2] Add sphinx-llms-txt to generate llms.txt and llms-full.txt - Add sphinx-llms-txt extension and config - Remove .txt from source_suffix - Tighten exclude_patterns (venv, node_modules, _templates, includes/*) - Add html_baseurl fallback for local builds Co-Authored-By: Claude Sonnet 4.6 --- docs/conf.py | 22 ++++++++++++++++++---- docs/requirements.txt | 1 + generated-docs/out/conf.py | 22 ++++++++++++++++++---- generated-docs/out/requirements.txt | 1 + 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4b0be4c934..2724bed7e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,10 @@ import os # Define the canonical URL if you are using a custom domain on Read the Docs -html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +html_baseurl = os.environ.get( + "READTHEDOCS_CANONICAL_URL", + "https://sttp.softwaremill.com/en/latest/", +) # Tell Jinja2 templates the build is running on Read the Docs if os.environ.get("READTHEDOCS", "") == "True": @@ -41,10 +44,14 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['myst_parser', 'sphinx_rtd_theme'] +extensions = ['myst_parser', 'sphinx_rtd_theme', 'sphinx_llms_txt'] myst_enable_extensions = ['attrs_block'] +llms_txt_title = "sttp" +llms_txt_summary = "The Scala HTTP client you always wanted!" +llms_txt_full_file = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -54,7 +61,6 @@ # source_suffix = ['.rst', '.md'] source_suffix = { '.rst': 'restructuredtext', - '.txt': 'markdown', '.md': 'markdown', } @@ -85,7 +91,15 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = [ + '_build', 'Thumbs.db', '.DS_Store', + '.venv', 'venv', 'env', + '**/site-packages/**', + '**/node_modules/**', + '_templates', + 'requirements.txt', + 'includes/*', +] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'default' diff --git a/docs/requirements.txt b/docs/requirements.txt index e8548070c2..71eaa500b3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,3 +2,4 @@ sphinx_rtd_theme==2.0.0 sphinx==7.3.7 sphinx-autobuild==2024.4.16 myst-parser==2.0.0 +sphinx-llms-txt diff --git a/generated-docs/out/conf.py b/generated-docs/out/conf.py index 4b0be4c934..2724bed7e5 100644 --- a/generated-docs/out/conf.py +++ b/generated-docs/out/conf.py @@ -24,7 +24,10 @@ import os # Define the canonical URL if you are using a custom domain on Read the Docs -html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +html_baseurl = os.environ.get( + "READTHEDOCS_CANONICAL_URL", + "https://sttp.softwaremill.com/en/latest/", +) # Tell Jinja2 templates the build is running on Read the Docs if os.environ.get("READTHEDOCS", "") == "True": @@ -41,10 +44,14 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['myst_parser', 'sphinx_rtd_theme'] +extensions = ['myst_parser', 'sphinx_rtd_theme', 'sphinx_llms_txt'] myst_enable_extensions = ['attrs_block'] +llms_txt_title = "sttp" +llms_txt_summary = "The Scala HTTP client you always wanted!" +llms_txt_full_file = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -54,7 +61,6 @@ # source_suffix = ['.rst', '.md'] source_suffix = { '.rst': 'restructuredtext', - '.txt': 'markdown', '.md': 'markdown', } @@ -85,7 +91,15 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = [ + '_build', 'Thumbs.db', '.DS_Store', + '.venv', 'venv', 'env', + '**/site-packages/**', + '**/node_modules/**', + '_templates', + 'requirements.txt', + 'includes/*', +] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'default' diff --git a/generated-docs/out/requirements.txt b/generated-docs/out/requirements.txt index e8548070c2..71eaa500b3 100644 --- a/generated-docs/out/requirements.txt +++ b/generated-docs/out/requirements.txt @@ -2,3 +2,4 @@ sphinx_rtd_theme==2.0.0 sphinx==7.3.7 sphinx-autobuild==2024.4.16 myst-parser==2.0.0 +sphinx-llms-txt From 719dd7f483f4ae9a16444e59c7602438b978c427 Mon Sep 17 00:00:00 2001 From: Adam Fish Rybicki Date: Wed, 24 Jun 2026 12:25:08 +0200 Subject: [PATCH 2/2] Ignore local Sphinx build artifacts in generated-docs/out Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index afc2b14ed2..056deb8d69 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,7 @@ work.txt # TraceVault — local only, do not commit .tracevault/ .claude/settings.local.json + +# Local Sphinx build artifacts +generated-docs/out/.venv/ +generated-docs/out/_build/