-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathcommon_conf.py
More file actions
78 lines (61 loc) · 2.36 KB
/
common_conf.py
File metadata and controls
78 lines (61 loc) · 2.36 KB
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
# This contains common configuration information for the ardupilot wikis.
# This information is imported by the conf.py files in each of the sub wikis
import os
import sys
# Add the wiki root and extensions directory to the path so our custom extensions can be found
_wiki_root = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, _wiki_root)
sys.path.insert(0, os.path.join(_wiki_root, 'scripts', 'extensions'))
# Parallel reading of source files (use all available CPUs)
parallel_read_safe = True
parallel_write_safe = True
# 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.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.mathjax', # For :math: element rendering
'sphinx.ext.ifconfig',
'sphinxcontrib.youtube', # For youtube embedding
'sphinxcontrib.jquery',
'sphinx_tabs.tabs', # For clickable tabs
'sphinx_skip_versioned_params', # Skip labels for versioned parameter files (saves RAM/time)
]
# wiki_base_url='https://dl.dropboxusercontent.com/u/3067678/share2/wiki'
# intersphinx_base_url=wiki_base_url+'/%s/build/html/'
wiki_base_url = 'https://ardupilot.org/'
intersphinx_base_url = wiki_base_url + '%s/'
# Where to point the base of the build for the main site menu
html_context = {'target': '/'}
# This needs to change to the actual URL root once the theme updated.
# Don't generate search index for versioned parameter pages
html_search_options = {
'dict_max_word_length': 40, # Skip very long parameter names
}
# Known wiki keys (single source of truth)
WIKI_KEYS = [
'antennatracker',
'ardupilot',
'blimp',
'copter',
'dev',
'mavproxy',
'plane',
'planner',
'planner2',
'rover',
'sub',
]
# Build mapping programmatically (remote auto-discovery by using None for objects.inv)
intersphinx_mapping = {k: (intersphinx_base_url % k, None) for k in WIKI_KEYS}
# Suppress warnings that slow down builds (already have nitpicky = False)
suppress_warnings = [
'epub.unknown_project_files', # Suppress epub warnings
]
disable_non_local_image_warnings = True
if disable_non_local_image_warnings:
suppress_warnings.append('image.nonlocal_uri') # Suppress external image warnings
def setup(app):
app.add_css_file("common_theme_override.css")