conf.py 3 KB
Newer Older
1
2
3
4
5
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Configuration file for the Sphinx documentation builder.
import os
6
import sys
7
8

# -- Project information -----------------------------------------------------
9
10
project = "NVIDIA Dynamo"
copyright = "2024-2025, NVIDIA CORPORATION & AFFILIATES"
11
author = "NVIDIA"
12
release = "latest"
13
14
15

# -- General configuration ---------------------------------------------------

16
# Standard extensions
17
18
19
20
21
extensions = [
    "ablog",
    "myst_parser",
    "sphinx_copybutton",
    "sphinx_design",
22
    "sphinx_prompt",
23
24
25
26
27
28
29
30
31
32
    # "sphinxcontrib.bibtex",
    "sphinx_tabs.tabs",
    "sphinx_sitemap",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.mathjax",
    "sphinx.ext.napoleon",
    "sphinx.ext.ifconfig",
    "sphinx.ext.extlinks",
    "sphinxcontrib.mermaid",
33
    "sphinx_reredirects",
34
35
]

36
37
38
# Custom extensions
sys.path.insert(0, os.path.abspath("_extensions"))
extensions.append("github_alerts")
39

40
41
# Handle Mermaid diagrams as code blocks (not directives) to avoid warnings
myst_fence_as_directive = ["mermaid"]  # Uncomment if sphinxcontrib-mermaid is installed
42

43
44
# File extensions (myst_parser automatically handles .md files)
source_suffix = [".rst", ".md"]
45

46
# MyST parser configuration
47
myst_enable_extensions = [
48
49
50
51
    "colon_fence",  # ::: code blocks
    "deflist",  # Definition lists
    "html_image",  # HTML images
    "tasklist",  # Task lists
52
53
]

54
55
# Templates path
templates_path = ["_templates"]
56

57
58
# List of patterns to ignore when looking for source files
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "build"]
59
60
61
62

# -- Options for HTML output -------------------------------------------------
html_theme = "nvidia_sphinx_theme"
html_static_path = ["_static"]
63
html_extra_path = ["project.json", "versions1.json"]
64
65
html_theme_options = {
    "collapse_navigation": False,
66
67
68
69
70
71
72
73
    "icon_links": [
        {
            "name": "GitHub",
            "url": "https://github.com/ai-dynamo/dynamo",
            "icon": "fa-brands fa-github",
        }
    ],
    "switcher": {
74
        "json_url": "versions1.json",
75
76
77
78
79
80
81
82
83
84
85
86
        "version_match": release,
    },
    "extra_head": {
        """
    <script src="https://assets.adobedtm.com/5d4962a43b79/c1061d2c5e7b/launch-191c2462b890.min.js" ></script>
    """
    },
    "extra_footer": {
        """
    <script type="text/javascript">if (typeof _satellite !== "undefined") {_satellite.pageBottom();}</script>
    """
    },
87
    "navbar_start": ["navbar-logo"],
88
89
90
    "primary_sidebar_end": [],
}

91
92
93
94
95
# Document settings
master_doc = "index"
html_title = f"{project} Documentation"
html_short_title = project
html_baseurl = "https://docs.nvidia.com/dynamo/latest/"
96

97
98
99
100
# Suppress warnings for external links and missing references
suppress_warnings = [
    "myst.xref_missing",  # Missing cross-references of relative links outside docs folder
]
101

102
103
104
# Additional MyST configuration
myst_heading_anchors = 7  # Generate anchors for headers
myst_substitutions = {}  # Custom substitutions