# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- import re import subprocess # -- Project information ----------------------------------------------------- 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, and a single combined documentation llms-full.txt file, written in reStructuredText. """ # This doesn't seem to be supported # rst_file_suffix = ".html.rst" markdown_file_suffix = ".html.md" extlinks = { "ghfile": ("https://github.com/jdillard/sphinx-llms-txt/blob/main/%s", "%s") } # 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"]) current_tag = GIT_TAG_OUTPUT.decode().strip() if re.match(r"^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$", current_tag): version = current_tag else: version = "latest" except (subprocess.CalledProcessError, FileNotFoundError): version = "latest" # The full version, including alpha/beta/rc tags release = "" # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.intersphinx", "sphinx_contributors", "sphinx_llms_txt", "sphinxcontrib.restbuilder", "sphinx_inline_tabs", "sphinx.ext.extlinks", ] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" intersphinx_mapping = { "sphinx": ("https://www.sphinx-doc.org/en/master/", None), } # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { "source_repository": "https://github.com/jdillard/sphinx-llms-txt/", "source_branch": "main", "source_directory": "docs/source/", } html_baseurl = "https://sphinx-llms-txt.readthedocs.org/en/latest/" # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = "SphinxLLMsTxtdoc" def setup(app): app.add_object_type( "confval", "confval", objname="configuration value", indextemplate="pair: %s; configuration value", )