Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
| 2 | |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 3 | import sys |
Gaute Svanes Lunde | 99a2d8a | 2023-01-11 17:48:12 +0100 | [diff] [blame] | 4 | from pathlib import Path |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 5 | |
| 6 | # -- Paths ------------------------------------------------------------------- |
| 7 | |
| 8 | MATTER_BASE = Path(__file__).resolve().parents[1] |
| 9 | |
| 10 | sys.path.insert(0, str(MATTER_BASE / "docs" / "_extensions")) |
| 11 | |
| 12 | # -- Project information ----------------------------------------------------- |
| 13 | |
| 14 | project = "Matter" |
Grzegorz Ferenc | 2d4895e | 2023-03-29 15:30:20 +0200 | [diff] [blame] | 15 | copyright = "2020-2023, Matter Contributors" |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 16 | author = "Matter Contributors" |
| 17 | version = "1.0.0" |
| 18 | |
| 19 | # -- General configuration --------------------------------------------------- |
| 20 | |
| 21 | extensions = [ |
| 22 | "myst_parser", |
| 23 | "external_content", |
| 24 | ] |
| 25 | exclude_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 Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 32 | "examples/thermostat/nxp/linux-se05x/README.md", |
Andrei Litvin | 0062c5d | 2023-03-02 12:20:44 -0500 | [diff] [blame] | 33 | "examples/common/m5stack-tft/repo", |
Grzegorz Ferenc | 2d4895e | 2023-03-29 15:30:20 +0200 | [diff] [blame] | 34 | "docs/guides/README.md", |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 35 | ] |
| 36 | |
| 37 | |
| 38 | # -- Options for HTML output ------------------------------------------------- |
| 39 | |
| 40 | html_theme = "sphinx_book_theme" |
| 41 | html_logo = "_static/images/logo.png" |
| 42 | html_favicon = "_static/images/favicon.ico" |
| 43 | html_static_path = ["_static"] |
| 44 | html_theme_options = { |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 45 | "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 Litvin | 0062c5d | 2023-03-02 12:20:44 -0500 | [diff] [blame] | 50 | "icon_links": [], |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | # -- Options for MyST -------------------------------------------------------- |
| 54 | |
| 55 | myst_heading_anchors = 6 |
Andrei Litvin | 0062c5d | 2023-03-02 12:20:44 -0500 | [diff] [blame] | 56 | suppress_warnings = [ |
| 57 | "myst.header", |
| 58 | "myst.anchor", |
| 59 | ] |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 60 | myst_enable_extensions = ["html_image"] |
| 61 | |
| 62 | |
| 63 | # -- Options for external_content -------------------------------------------- |
| 64 | |
| 65 | external_content_contents = [ |
| 66 | (MATTER_BASE / "docs", "[!_R]*"), |
Andrei Litvin | 754a938 | 2023-11-03 14:21:34 -0400 | [diff] [blame] | 67 | (MATTER_BASE, "data_model/**/*.md"), |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 68 | (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 Ferenc | f1096a5 | 2023-04-28 08:14:09 +0200 | [diff] [blame] | 73 | (MATTER_BASE, "src/tools/**/*.md"), |
| 74 | (MATTER_BASE, "scripts/tools/**/*.md"), |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 75 | ] |
| 76 | external_content_link_prefixes = [ |
| 77 | "src/", |
| 78 | r"\.vscode/", |
Andrei Litvin | cd51a20 | 2023-03-02 12:40:39 -0500 | [diff] [blame] | 79 | "CONTRIBUTING", # cannot detect CONTRIBUTING.md |
| 80 | "README", # cannot detect README.md |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 81 | "scripts/", |
| 82 | "examples/android/", |
Andrei Litvin | 754a938 | 2023-11-03 14:21:34 -0400 | [diff] [blame] | 83 | "data_model/", |
Gaute Svanes Lunde | e7347ea | 2023-01-09 19:43:07 +0100 | [diff] [blame] | 84 | ] |
| 85 | external_content_link_extensions = [".md", ".png", ".jpg", ".svg"] |