conf.py 2.6 KB
Newer Older
1
2
import pytorch_sphinx_theme

3
4
__version__ = None
exec(open("../../nerfacc/version.py", "r").read())
5

Ruilong Li's avatar
docs  
Ruilong Li committed
6
7
8
9
10
11
# -- Project information

project = "nerfacc"
copyright = "2022, Ruilong"
author = "Ruilong"

12
release = __version__
Ruilong Li's avatar
docs  
Ruilong Li committed
13
14
15
16

# -- General configuration

extensions = [
Ruilong Li's avatar
fix doc  
Ruilong Li committed
17
    "sphinx.ext.napoleon",
Ruilong Li's avatar
docs  
Ruilong Li committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    "sphinx.ext.duration",
    "sphinx.ext.doctest",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.intersphinx",
]

intersphinx_mapping = {
    "python": ("https://docs.python.org/3/", None),
    "sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_domains = ["std"]

templates_path = ["_templates"]

# -- Options for HTML output

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# html_theme = "furo"

html_theme = "pytorch_sphinx_theme"
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_static_path = ["_static"]
html_css_files = ["css/readthedocs.css"]

# Ignore >>> when copying code
copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
html_theme_options = {
    # The target url that the logo directs to. Unset to do nothing
Ruilong Li's avatar
Ruilong Li committed
51
    "logo_url": "https://www.nerfacc.com/",
52
53
54
    # "menu" is a list of dictionaries where you can specify the content and the
    # behavior of each item in the menu. Each item can either be a link or a
    # dropdown menu containing a list of links.
Ruilong Li(李瑞龙)'s avatar
Ruilong Li(李瑞龙) committed
55
56
    "menu": [
        # A link
Ruilong Li's avatar
Ruilong Li committed
57
58
59
60
        {
            "name": "GitHub",
            "url": "https://github.com/nerfstudio-project/nerfacc",
        },
Ruilong Li(李瑞龙)'s avatar
Ruilong Li(李瑞龙) committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
        # A dropdown menu
        # {
        #     "name": "Projects",
        #     "children": [
        #         # A vanilla dropdown item
        #         {
        #             "name": "nerfstudio",
        #             "url": "https://docs.nerf.studio/",
        #             "description": "The all-in-one repo for NeRFs",
        #         },
        #     ],
        #     # Optional, determining whether this dropdown menu will always be
        #     # highlighted.
        #     # "active": True,
        # },
    ],
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
}
# html_theme_options = {
#     "canonical_url": "",
#     "analytics_id": "",
#     "logo_only": False,
#     "display_version": True,
#     "prev_next_buttons_location": "bottom",
#     "style_external_links": False,
#     # Toc options
#     "collapse_navigation": True,
#     "sticky_navigation": True,
#     "navigation_depth": 4,
#     "includehidden": True,
#     "titles_only": False
# }
Ruilong Li's avatar
docs  
Ruilong Li committed
92
93
94

# -- Options for EPUB output
epub_show_urls = "footnote"
95
96
97

# typehints
autodoc_typehints = "description"