conf.py 2.27 KB
Newer Older
Stanislav Pidhorskyi's avatar
Stanislav Pidhorskyi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python3

# -- Path setup --------------------------------------------------------------

import builtins
import os
import sys

builtins.__sphinx_build__ = True

current_dir = os.path.dirname(__file__)
target_dir = os.path.abspath(os.path.join(current_dir, "../.."))
sys.path.insert(0, target_dir)
print(target_dir)
from drtk import __version__

# -- Project information -----------------------------------------------------

project = "DRTK"
copyright = "2024, Meta"
author = "Meta"
version = __version__

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

html_theme = "pydata_sphinx_theme"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    "sphinx_markdown_builder",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.viewcode",
    "sphinx.ext.napoleon",
    "nbsphinx",
    "sphinx.ext.intersphinx",
    "myst_parser",
    "sphinx_design",
]
autosummary_generate = True
katex_prerender = True

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

master_doc = "index"
autodoc_typehints = "none"


html_theme_options = {
    "navbar_align": "content",
    "navbar_start": ["navbar-logo"],
    "navbar_end": ["theme-switcher", "navbar-icon-links"],
    "collapse_navigation": True,
    "secondary_sidebar_items": ["page-toc"],
    "show_prev_next": False,
    "back_to_top_button": False,
    "pygments_light_style": "a11y-light",
    "pygments_dark_style": "a11y-dark",
    "icon_links": [
        {
            # Label for this link
            "name": "GitHub",
            # URL where the link will redirect
            "url": "https://github.com/facebookresearch/DRTK",
            # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local")
            "icon": "fa-brands fa-github fa-2xl",
            # The type of image to be used (see below for details)
            "type": "fontawesome",
            "attributes": {},
        }
    ],
    "logo": {
        "text": "DRTK",
    },
}

html_static_path = ["_static"]
html_css_files = ["custom.css"]