2021-11-04 04:19:49 +01:00
|
|
|
|
# For documentation on Sphinx configuration options, see:
|
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
|
# https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html
|
|
|
|
|
# https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html
|
2024-03-12 16:58:21 +01:00
|
|
|
|
# https://sphinx-design.readthedocs.io/en/latest/tabs.html
|
2021-11-04 04:19:49 +01:00
|
|
|
|
|
2015-08-18 01:25:12 +02:00
|
|
|
|
import os
|
2019-11-22 03:55:23 +01:00
|
|
|
|
import sys
|
2021-11-04 04:19:49 +01:00
|
|
|
|
from typing import Any
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2019-11-22 03:55:23 +01:00
|
|
|
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
2021-09-10 00:16:29 +02:00
|
|
|
|
from version import LATEST_RELEASE_VERSION, ZULIP_VERSION
|
2019-11-22 03:55:23 +01:00
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
on_rtd = os.environ.get("READTHEDOCS") == "True"
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
# General configuration
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2021-08-10 07:55:12 +02:00
|
|
|
|
extensions = [
|
|
|
|
|
"myst_parser",
|
2021-11-04 04:54:47 +01:00
|
|
|
|
"sphinx_rtd_theme",
|
2024-03-12 16:58:21 +01:00
|
|
|
|
"sphinx_design",
|
2021-08-10 07:55:12 +02:00
|
|
|
|
]
|
2021-02-12 08:20:45 +01:00
|
|
|
|
templates_path = ["_templates"]
|
|
|
|
|
project = "Zulip"
|
|
|
|
|
copyright = "2012–2015 Dropbox, Inc., 2015–2021 Kandra Labs, Inc., and contributors"
|
|
|
|
|
author = "The Zulip Team"
|
2019-11-22 03:55:23 +01:00
|
|
|
|
version = ZULIP_VERSION
|
|
|
|
|
release = ZULIP_VERSION
|
2021-02-12 08:20:45 +01:00
|
|
|
|
exclude_patterns = ["_build", "README.md"]
|
2021-11-04 04:19:49 +01:00
|
|
|
|
suppress_warnings = [
|
|
|
|
|
"myst.header",
|
|
|
|
|
]
|
2021-02-12 08:20:45 +01:00
|
|
|
|
pygments_style = "sphinx"
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
# Options for Markdown parser
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
myst_enable_extensions = [
|
|
|
|
|
"colon_fence",
|
|
|
|
|
"substitution",
|
|
|
|
|
]
|
2022-02-16 01:39:15 +01:00
|
|
|
|
myst_heading_anchors = 6
|
2021-09-10 00:16:29 +02:00
|
|
|
|
myst_substitutions = {
|
|
|
|
|
"LATEST_RELEASE_VERSION": LATEST_RELEASE_VERSION,
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
# Options for HTML output
|
2015-08-18 01:25:12 +02:00
|
|
|
|
|
2021-11-04 04:19:49 +01:00
|
|
|
|
html_theme = "sphinx_rtd_theme"
|
|
|
|
|
html_theme_options = {
|
2021-11-04 05:01:09 +01:00
|
|
|
|
"collapse_navigation": not on_rtd, # makes local builds much faster
|
2021-11-04 04:19:49 +01:00
|
|
|
|
"logo_only": True,
|
|
|
|
|
}
|
|
|
|
|
html_logo = "images/zulip-logo.svg"
|
|
|
|
|
html_static_path = ["_static"]
|
2015-08-18 23:42:27 +02:00
|
|
|
|
|
2021-02-12 08:19:30 +01:00
|
|
|
|
|
2018-01-23 19:44:41 +01:00
|
|
|
|
def setup(app: Any) -> None:
|
|
|
|
|
# overrides for wide tables in RTD theme
|
2021-02-12 08:20:45 +01:00
|
|
|
|
app.add_css_file("theme_overrides.css") # path relative to _static
|