forked from ArduPilot/ardupilot_wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common_conf.py
63 lines (50 loc) · 2.47 KB
/
common_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
# -*- coding: utf-8 -*-
#
# This contains common configuration information for the ardupilot wikis.
# This information is imported by the conf.py files in each of the sub wikis
#
#Set False to re-enable warnings for non-local images.
disable_non_local_image_warnings=True
#wiki_base_url='https://dl.dropboxusercontent.com/u/3067678/share2/wiki'
#intersphinx_base_url=wiki_base_url+'/%s/build/html/'
wiki_base_url='http://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.
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'copter': (intersphinx_base_url % 'copter',
None),
'plane': (intersphinx_base_url % 'plane',
None),
'rover': (intersphinx_base_url % 'rover',
None),
'planner': (intersphinx_base_url % 'planner',
None),
'planner2': (intersphinx_base_url % 'planner2',
None),
'dev': (intersphinx_base_url % 'dev',
None),
'antennatracker': (intersphinx_base_url % 'antennatracker',
None),
'ardupilot': (intersphinx_base_url % 'ardupilot',
None),
'mavproxy': (intersphinx_base_url % 'mavproxy',
None),
}
############ PATCH REMOVE NON-LOCAL IMAGE WARNINGS
### From:
## http://stackoverflow.com/questions/12772927/specifying-an-online-image-in-sphinx-restructuredtext-format
## And https://github.com/sphinx-doc/sphinx/issues/2429
#Set False to re-enable warnings for non-local images.
disable_non_local_image_warnings=True
if disable_non_local_image_warnings:
import sphinx.environment
from docutils.utils import get_source_line
def _warn_node(self, msg, node, **kwargs):
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node),**kwargs)
sphinx.environment.BuildEnvironment.warn_node = _warn_node
############ ENDPATH
def setup(app):
app.add_stylesheet("common_theme_override.css")