summaryrefslogtreecommitdiff
path: root/sphinx/builders/websupport.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-11-21 08:25:43 +0100
committerGeorg Brandl <georg@python.org>2010-11-21 08:25:43 +0100
commit7e3f9d866a8d0d57c13a6e66329c17509e26229a (patch)
tree6e3cca843a911d3498e568aa2f3faf197f0543f3 /sphinx/builders/websupport.py
parentdae3933e87edad48dd0b03cb308345daba2db6a2 (diff)
downloadsphinx-git-7e3f9d866a8d0d57c13a6e66329c17509e26229a.tar.gz
Fix a few smaller issues. Add JS and CSS for all pages.
Diffstat (limited to 'sphinx/builders/websupport.py')
-rw-r--r--sphinx/builders/websupport.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py
index 9ca9f3bb7..d4c08c295 100644
--- a/sphinx/builders/websupport.py
+++ b/sphinx/builders/websupport.py
@@ -50,6 +50,10 @@ class WebSupportBuilder(PickleHTMLBuilder, VersioningBuilderMixin):
def init_translator_class(self):
self.translator_class = WebSupportTranslator
+ def prepare_writing(self, docnames):
+ PickleHTMLBuilder.prepare_writing(self, docnames)
+ self.globalcontext['no_search_suffix'] = True
+
def write_doc(self, docname, doctree):
destination = StringOutput(encoding='utf-8')
doctree.settings = self.docsettings
@@ -112,6 +116,10 @@ class WebSupportBuilder(PickleHTMLBuilder, VersioningBuilderMixin):
for item in ['sidebar', 'relbar', 'script', 'css']:
if hasattr(template_module, item):
doc_ctx[item] = getattr(template_module, item)()
+ if 'script' not in self.globalcontext:
+ self.globalcontext['script'] = doc_ctx['script']
+ if 'css' not in self.globalcontext:
+ self.globalcontext['css'] = doc_ctx['css']
if not outfilename:
outfilename = path.join(self.outdir, 'pickles',