forked from kimnluong/f1tenth_coursekit
-
Notifications
You must be signed in to change notification settings - Fork 22
/
conf.py
146 lines (109 loc) · 4.32 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# -*- coding: utf-8 -*-
#
# Godot Engine documentation build configuration file
import sys
import os
# -- General configuration ------------------------------------------------
needs_sphinx = '1.3'
# Sphinx extension module names and templates location
sys.path.append(os.path.abspath('extensions'))
extensions = ['gdscript', 'sphinx_tabs.tabs', 'sphinx.ext.imgmath', 'sphinx.ext.todo']
templates_path = ['_templates']
# You can specify multiple suffix as a list of string: ['.rst', '.md']
source_suffix = '.rst'
source_encoding = 'utf-8-sig'
# The master toctree document
master_doc = 'index'
# General information about the project
project = 'F1TENTH - Learn'
copyright = '2018-2020, F1TENTH community (CC-BY-NC-SA 4.0)'
author = 'F1TENTH community'
# Version info for the project, acts as replacement for |version| and |release|
# The short X.Y version
version = 'latest'
# The full version, including alpha/beta/rc tags
release = 'latest'
# Parse Sphinx tags passed from RTD via environment
env_tags = os.getenv('SPHINX_TAGS')
if env_tags != None:
for tag in env_tags.split(','):
print("Adding Sphinx tag: %s" % tag.strip())
tags.add(tag.strip())
# Language / i18n
language = os.getenv('READTHEDOCS_LANGUAGE', 'en')
is_i18n = tags.has('i18n')
exclude_patterns = ['_build']
# GDScript syntax highlighting
from gdscript import GDScriptLexer
from sphinx.highlighting import lexers
lexers['gdscript'] = GDScriptLexer()
# Pygments (syntax highlighting) style to use
pygments_style = 'sphinx'
highlight_language = 'gdscript'
# -- Options for HTML output ----------------------------------------------
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
if on_rtd:
using_rtd_theme = True
# Theme options
html_theme_options = {
# 'typekit_id': 'hiw1hhg',
# 'analytics_id': '',
# 'sticky_navigation': True # Set to False to disable the sticky nav while scrolling.
'logo_only': False, # if we have a html_logo below, this shows /only/ the logo with no title text
'collapse_navigation': False, # Collapse navigation (False makes it tree-like)
'prev_next_buttons_location': 'bottom',
# 'display_version': True, # Display the docs version
# 'navigation_depth': 4, # Depth of the headers shown in the navigation bar
}
# VCS options: https://docs.readthedocs.io/en/latest/vcs.html#github
html_context = {
"display_github": not is_i18n, # Integrate GitHub
"github_user": "f1tenth", # Username
"github_repo": "f1tenth_coursekit", # Repo name
"github_version": "master", # Version
"conf_py_path": "/", # Path in the checkout to the docs root
}
# html_logo = 'press/img/logo/f1_stickers_02.png'
html_favicon = 'press/img/logo/f1_stickers_02.png'
# These folders are copied to the documentation's HTML output
html_static_path = ['_static']
html_extra_path = ['robots.txt']
# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = [
'css/custom.css',
]
html_js_files = [
'js/custom.js',
]
# Hide copyright in footer
html_show_copyright = True
html_show_sphinx = True
html_last_updated_fmt = '%b %d, %Y'
# Output file base name for HTML help builder
htmlhelp_basename = 'F1TENTH_coursekit'
# -- Options for reStructuredText parser ----------------------------------
# Enable directives that insert the contents of external files
file_insertion_enabled = False
# -- Options for LaTeX output ---------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'F1TENTH_coursekit.tex', 'F1TENTH Course Kit',
'F1TENTH community', 'manual'),
]
# -- Options for linkcheck builder ----------------------------------------
# disable checking urls with about.html#this_part_of_page anchors
linkcheck_anchors = False
linkcheck_timeout = 10
# -- I18n settings --------------------------------------------------------
locale_dirs = ['../sphinx/po/']
gettext_compact = False
# Exclude class reference when marked with tag i18n.
if is_i18n:
exclude_patterns = ['classes']