[IMP][PERF] Parallelize documentation build
This commit is contained in:
parent
90b92138c7
commit
4ec450d64a
3
Makefile
3
Makefile
@ -5,7 +5,8 @@ CONFIG_DIR = .
|
||||
SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSION) \
|
||||
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
|
||||
-D is_remote_build=$(IS_REMOTE_BUILD) \
|
||||
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY)
|
||||
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
|
||||
-j auto
|
||||
SOURCE_DIR = content
|
||||
BUILD_DIR = _build
|
||||
|
||||
|
@ -19,3 +19,8 @@ def setup(app):
|
||||
directives.register_directive('autodata', PlaceHolder)
|
||||
directives.register_directive('automethod', PlaceHolder)
|
||||
directives.register_directive('autoattribute', PlaceHolder)
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
@ -61,6 +61,11 @@ class Vimeo(IframeVideo):
|
||||
class="align-%(align)s"></iframe>'
|
||||
|
||||
|
||||
def setup(builder):
|
||||
def setup(app):
|
||||
directives.register_directive('youtube', Youtube)
|
||||
directives.register_directive('vimeo', Vimeo)
|
||||
directives.register_directive('vimeo', Vimeo)
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
@ -20,5 +20,9 @@ def setup(app):
|
||||
lambda self, node: self.depart_admonition(node),
|
||||
))
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
||||
admonitionlabels['exercise'] = 'Exercise'
|
||||
|
@ -74,6 +74,10 @@ def setup(app):
|
||||
odoo_repository=True)
|
||||
app.config.linkcode_resolve = linkcode_resolve
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
||||
def make_github_link(app, path, line=None, mode="blob", odoo_repository=False):
|
||||
config = app.config
|
||||
|
@ -39,6 +39,10 @@ def setup(app):
|
||||
('kbd', kbd), ('var', var), ('samp', samp)]:
|
||||
addnode(app, node, name)
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
||||
class div(nodes.General, nodes.Element):
|
||||
pass
|
||||
|
@ -15,6 +15,10 @@ def setup(app):
|
||||
app.add_js_file('js/menu.js')
|
||||
app.add_js_file('js/page_toc.js')
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
||||
def set_missing_meta(app, pagename, templatename, context, doctree):
|
||||
if context.get('meta') is None: # Pages without title (used with `include::`) have no meta
|
||||
|
@ -62,3 +62,8 @@ def generate_redirects(app):
|
||||
def setup(app):
|
||||
app.add_config_value('redirects_file', 'redirects', 'env')
|
||||
app.connect('builder-inited', generate_redirects)
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
@ -12,6 +12,11 @@ def setup(app):
|
||||
|
||||
app.connect('env-updated', add_statics)
|
||||
|
||||
return {
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True
|
||||
}
|
||||
|
||||
def add_statics(app, env):
|
||||
app.add_js_file('js/switcher.js')
|
||||
env.config.html_static_path.append(statics())
|
||||
|
Loading…
Reference in New Issue
Block a user