2026-04-23 15:37:57 -03:00
|
|
|
# Configuration file for the Sphinx documentation builder.
|
|
|
|
|
#
|
|
|
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
|
|
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
|
import os
|
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
project = 'Logos Storage Module'
|
|
|
|
|
copyright = '2026, Institute of Free Technology'
|
|
|
|
|
author = 'Institute of Free Technology'
|
|
|
|
|
|
|
|
|
|
selfpath = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
git_tag = 'preview'
|
|
|
|
|
try:
|
|
|
|
|
git_tag = subprocess.check_output(
|
|
|
|
|
['git', 'describe', '--tags', '--abbrev=0'],
|
|
|
|
|
cwd=selfpath,
|
|
|
|
|
stderr=subprocess.DEVNULL,
|
|
|
|
|
).decode().strip().lstrip('v')
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
version = git_tag
|
|
|
|
|
release = git_tag
|
|
|
|
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
|
|
|
|
|
|
extensions = []
|
|
|
|
|
templates_path = ['_templates']
|
|
|
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
|
|
|
|
|
|
root_doc = 'index'
|
2026-06-22 16:31:49 +04:00
|
|
|
|
|
|
|
|
# The @code{.json} blocks in the C++ headers are type schemas (e.g. "id": string),
|
|
|
|
|
# not valid JSON, so Pygments cannot highlight them. They still render fine in
|
|
|
|
|
# relaxed mode; silence only this category so -W stays meaningful for real issues.
|
|
|
|
|
suppress_warnings = ['misc.highlighting_failure']
|
2026-04-23 15:37:57 -03:00
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
|
|
|
|
|
|
html_theme = 'pydata_sphinx_theme'
|
|
|
|
|
html_static_path = ['_static']
|
|
|
|
|
|
|
|
|
|
## -- Breathe configuration --------------------------------------------------
|
|
|
|
|
|
|
|
|
|
extensions += ['breathe']
|
|
|
|
|
|
|
|
|
|
breathe_projects = {
|
|
|
|
|
"Logos Storage Module":
|
|
|
|
|
os.path.join(selfpath, "xml")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
breathe_default_project = "Logos Storage Module"
|
|
|
|
|
|
|
|
|
|
# -- Theme ------------------------------------------------------------------
|
|
|
|
|
html_logo = "_static/logos-logo-dark.png"
|
|
|
|
|
html_favicon = "_static/logos-logo-dark.png"
|
2026-06-18 21:15:24 +04:00
|
|
|
html_css_files = ["custom.css"]
|
2026-04-23 15:37:57 -03:00
|
|
|
|
|
|
|
|
html_theme_options = {
|
|
|
|
|
"external_links": [
|
2026-06-18 21:15:24 +04:00
|
|
|
{
|
|
|
|
|
"name": "Tutorial",
|
2026-06-22 16:31:49 +04:00
|
|
|
"url": "https://logos-co.github.io/logos-doctest-hub/#logos-storage-module/ubuntu-latest/running-this-storage-module-against-logoscore",
|
2026-06-18 21:15:24 +04:00
|
|
|
},
|
2026-04-23 15:37:57 -03:00
|
|
|
{
|
|
|
|
|
"name": "Logos",
|
|
|
|
|
"url": "https://logos.co",
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"icon_links": [
|
|
|
|
|
{
|
|
|
|
|
"name": "GitHub",
|
|
|
|
|
"url": "https://github.com/logos-co/logos-storage-module",
|
|
|
|
|
"icon": "fa-brands fa-github",
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"logo": {
|
|
|
|
|
"text": f"Storage Module {version}",
|
|
|
|
|
"image_dark": "_static/logos-logo-dark.png",
|
|
|
|
|
},
|
2026-06-18 18:28:40 +04:00
|
|
|
"switcher": {
|
2026-06-18 21:15:24 +04:00
|
|
|
"json_url": os.environ.get(
|
|
|
|
|
"SWITCHER_JSON_URL",
|
|
|
|
|
"https://logos-co.github.io/logos-storage-module/switcher.json"),
|
2026-06-18 18:28:40 +04:00
|
|
|
"version_match": version,
|
|
|
|
|
},
|
2026-06-18 21:15:24 +04:00
|
|
|
"navbar_end": ["version-switcher", "navbar-icon-links"],
|
2026-04-23 15:37:57 -03:00
|
|
|
}
|
2026-06-18 21:15:24 +04:00
|
|
|
|
|
|
|
|
# Follow the OS light/dark preference instead of showing a theme toggle.
|
|
|
|
|
html_context = {"default_mode": "auto"}
|