conf.py 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Configuration file for the Sphinx documentation builder.
  2. import sys
  3. from pathlib import Path
  4. # -- Paths -------------------------------------------------------------------
  5. MATTER_BASE = Path(__file__).resolve().parents[1]
  6. sys.path.insert(0, str(MATTER_BASE / "docs" / "_extensions"))
  7. # -- Project information -----------------------------------------------------
  8. project = "Matter"
  9. copyright = "2020-2023, Matter Contributors"
  10. author = "Matter Contributors"
  11. version = "1.0.0"
  12. # -- General configuration ---------------------------------------------------
  13. extensions = [
  14. "myst_parser",
  15. "external_content",
  16. ]
  17. exclude_patterns = [
  18. "_build",
  19. "examples/android/*",
  20. "**/nxp/linux-imx/imx8m/README.md",
  21. "examples/ota-requestor-app/efr32/README.md",
  22. "**/android/App/app/libs*",
  23. "examples/providers/README.md",
  24. "examples/thermostat/nxp/linux-se05x/README.md",
  25. "examples/common/m5stack-tft/repo",
  26. "docs/guides/README.md",
  27. "scripts/tools/memory/memdf/README.md",
  28. "scripts/tools/memory/platform/README.md",
  29. "scripts/tools/memory/README-GitHub-CI.md",
  30. ]
  31. # -- Options for HTML output -------------------------------------------------
  32. html_theme = "sphinx_book_theme"
  33. html_logo = "_static/images/logo.png"
  34. html_favicon = "_static/images/favicon.ico"
  35. html_static_path = ["_static"]
  36. html_theme_options = {
  37. "github_url": "https://github.com/project-chip/connectedhomeip",
  38. "repository_url": "https://github.com/project-chip/connectedhomeip",
  39. "use_edit_page_button": True,
  40. "repository_branch": "master",
  41. "path_to_docs": "docs",
  42. "icon_links": [],
  43. }
  44. # -- Options for MyST --------------------------------------------------------
  45. myst_heading_anchors = 6
  46. suppress_warnings = [
  47. "myst.header",
  48. "myst.anchor",
  49. ]
  50. myst_enable_extensions = ["html_image"]
  51. # -- Options for external_content --------------------------------------------
  52. external_content_contents = [
  53. (MATTER_BASE / "docs", "[!_R]*"),
  54. (MATTER_BASE, "README.md"),
  55. (MATTER_BASE, "examples/**/*.md"),
  56. (MATTER_BASE, "examples/**/*.png"),
  57. (MATTER_BASE, "examples/**/*.jpg"),
  58. (MATTER_BASE, "examples/**/*.JPG"),
  59. (MATTER_BASE, "src/tools/**/*.md"),
  60. (MATTER_BASE, "scripts/tools/**/*.md"),
  61. ]
  62. external_content_link_prefixes = [
  63. "src/",
  64. r"\.vscode/",
  65. "CONTRIBUTING", # cannot detect CONTRIBUTING.md
  66. "README", # cannot detect README.md
  67. "scripts/",
  68. "examples/android/",
  69. ]
  70. external_content_link_extensions = [".md", ".png", ".jpg", ".svg"]