-
Notifications
You must be signed in to change notification settings - Fork 5
/
conf.py
127 lines (98 loc) · 3.34 KB
/
conf.py
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import os
import sys
# The way Sphinx handles the path during the evaluation of the conf.py is a bit strange
# so we have to add the current folder or else the `import` statement will fail
sys.path.append(os.path.abspath("."))
from generatedocs import generate_docs
##########################################################################################
# CUSTOMIZATION #
##########################################################################################
# This is the branch on the OpenSpace repository from which the documentation will be
# built. Change this to a different branch to try a local branch before committing.
# OBS: No other value than `master` should ever be committed to the master branch of the
# docs repository
OPENSPACE_BRANCH = "master"
# If this value is specified, instead of cloning OpenSpace from the main repository using
# the branch provided above, instead use a local copy of the repository.
# OBS: No other value than the empty string should ever be committed to the master branch
# of the docs repository
LOCAL_OPENSPACE_FOLDER = ""
# Generate the files that dynamically depend on asset files in the main OpenSpace repo
generate_docs(OPENSPACE_BRANCH, LOCAL_OPENSPACE_FOLDER)
###
# Global Settings
###
needs_sphinx = "4.0"
project = "OpenSpace"
author = "OpenSpace community"
project_copyright = "2014-2024, OpenSpace community"
# Update with every new release
version = release = os.getenv("READTHEDOCS_VERSION", "0.20.0")
extensions = [
"myst_parser",
"notfound.extension",
"sphinx_copybutton",
"sphinx_design",
"sphinx.ext.autosectionlabel",
"sphinx.ext.duration",
"sphinxcontrib.jquery",
"sphinxcontrib.luadomain",
"sphinxcontrib.mermaid"
]
keep_warnings = True
###
# Content
###
source_encoding = "utf-8-sig"
exclude_patterns = [
"README.md",
".venv"
]
root_doc = "index"
primary_domain = "lua"
autosectionlabel_prefix_document = True
pygments_style = "default"
pygments_dark_style = "monokai"
myst_enable_extensions = {
"attrs_inline",
"colon_fence",
"fieldlist"
}
myst_heading_anchors = 3
###
# HTML output
###
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"logo_only" : True,
"display_version": False,
"collapse_navigation": False,
}
html_context = {
"display_github": True, # Integrate GitHub
"github_user": "OpenSpace", # Username
"github_repo": "OpenSpace-Docs", # Repo name
}
# Add a transparent image as the logo
# Instead we add the logo later in the css
# This enables different logos in dark and light mode
html_logo = "_static/transparent.png"
html_title = f"OpenSpace documentation ({version})"
html_short_title = "OpenSpace"
html_favicon = "_static/icon.png"
# JavaScript files that are added into the generated documentation
html_js_files = [
"custom.js"
]
# CSS files that are added into the generated documentation
html_css_files = [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css",
"required-reading.css",
"sidebar.css"
]
# These folders are copied to the documentation's HTML output
html_static_path = [ "_static" ]
templates_path = [ "_templates" ]
# html_extra_path = ["robots.txt"]