conf.py 2.55 KB
Newer Older
1
2
import pytorch_sphinx_theme

3
4
from nerfacc import __version__

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

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

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

# -- General configuration

extensions = [
Ruilong Li's avatar
fix doc  
Ruilong Li committed
16
    "sphinx.ext.napoleon",
Ruilong Li's avatar
docs  
Ruilong Li committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
    "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

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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
50
    "logo_url": "https://www.nerfacc.com/en/latest/index.html",
51
52
53
    # "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.
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
    # "menu": [
    #     # A link
    #     {"name": "GitHub", "url": "https://github.com/KAIR-BAIR/nerfacc"},
    #     # 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,
    #     },
    # ],
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
}
# 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
88
89
90

# -- Options for EPUB output
epub_show_urls = "footnote"
91
92
93

# typehints
autodoc_typehints = "description"