blob: 52402d86518b8046d32bcd143db2b602ff9de4e7 [file] [log] [blame]
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +01001# Configuration file for the Sphinx documentation builder.
2
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +01003import sys
Gaute Svanes Lunde99a2d8a2023-01-11 17:48:12 +01004from pathlib import Path
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +01005
6# -- Paths -------------------------------------------------------------------
7
8MATTER_BASE = Path(__file__).resolve().parents[1]
9
10sys.path.insert(0, str(MATTER_BASE / "docs" / "_extensions"))
11
12# -- Project information -----------------------------------------------------
13
14project = "Matter"
Grzegorz Ferenc2d4895e2023-03-29 15:30:20 +020015copyright = "2020-2023, Matter Contributors"
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010016author = "Matter Contributors"
17version = "1.0.0"
18
19# -- General configuration ---------------------------------------------------
20
21extensions = [
22 "myst_parser",
23 "external_content",
24]
25exclude_patterns = [
26 "_build",
27 "examples/android/*",
28 "**/nxp/linux-imx/imx8m/README.md",
29 "examples/ota-requestor-app/efr32/README.md",
30 "**/android/App/app/libs*",
31 "examples/providers/README.md",
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010032 "examples/thermostat/nxp/linux-se05x/README.md",
Andrei Litvin0062c5d2023-03-02 12:20:44 -050033 "examples/common/m5stack-tft/repo",
Grzegorz Ferenc2d4895e2023-03-29 15:30:20 +020034 "docs/guides/README.md",
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010035]
36
37
38# -- Options for HTML output -------------------------------------------------
39
40html_theme = "sphinx_book_theme"
41html_logo = "_static/images/logo.png"
42html_favicon = "_static/images/favicon.ico"
43html_static_path = ["_static"]
44html_theme_options = {
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010045 "github_url": "https://github.com/project-chip/connectedhomeip",
46 "repository_url": "https://github.com/project-chip/connectedhomeip",
47 "use_edit_page_button": True,
48 "repository_branch": "master",
49 "path_to_docs": "docs",
Andrei Litvin0062c5d2023-03-02 12:20:44 -050050 "icon_links": [],
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010051}
52
53# -- Options for MyST --------------------------------------------------------
54
55myst_heading_anchors = 6
Andrei Litvin0062c5d2023-03-02 12:20:44 -050056suppress_warnings = [
57 "myst.header",
58 "myst.anchor",
59]
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010060myst_enable_extensions = ["html_image"]
61
62
63# -- Options for external_content --------------------------------------------
64
65external_content_contents = [
66 (MATTER_BASE / "docs", "[!_R]*"),
Andrei Litvin754a9382023-11-03 14:21:34 -040067 (MATTER_BASE, "data_model/**/*.md"),
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010068 (MATTER_BASE, "README.md"),
69 (MATTER_BASE, "examples/**/*.md"),
70 (MATTER_BASE, "examples/**/*.png"),
71 (MATTER_BASE, "examples/**/*.jpg"),
72 (MATTER_BASE, "examples/**/*.JPG"),
Grzegorz Ferencf1096a52023-04-28 08:14:09 +020073 (MATTER_BASE, "src/tools/**/*.md"),
74 (MATTER_BASE, "scripts/tools/**/*.md"),
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010075]
76external_content_link_prefixes = [
77 "src/",
78 r"\.vscode/",
Andrei Litvincd51a202023-03-02 12:40:39 -050079 "CONTRIBUTING", # cannot detect CONTRIBUTING.md
80 "README", # cannot detect README.md
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010081 "scripts/",
82 "examples/android/",
Andrei Litvin754a9382023-11-03 14:21:34 -040083 "data_model/",
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010084]
85external_content_link_extensions = [".md", ".png", ".jpg", ".svg"]