def init(self): PickleHTMLBuilder.init(self) # templates are needed for this builder, but the serializing # builder does not initialize them self.init_templates() if not isinstance(self.templates, BuiltinTemplateLoader): raise RuntimeError("websupport builder must be used with " "the builtin templates") # add our custom JS self.script_files.append("_static/websupport.js")
def init(self): PickleHTMLBuilder.init(self) # templates are needed for this builder, but the serializing # builder does not initialize them self.init_templates() if not isinstance(self.templates, BuiltinTemplateLoader): raise RuntimeError('websupport builder must be used with ' 'the builtin templates') # add our custom JS self.script_files.append('_static/websupport.js')
def handle_finish(self): # get global values for css and script files _, doc_ctx = self._render_page('tmp', {}, 'page.html') self.globalcontext['css'] = doc_ctx['css'] self.globalcontext['script'] = doc_ctx['script'] PickleHTMLBuilder.handle_finish(self) # move static stuff over to separate directory directories = [self.imagedir, '_static'] for directory in directories: src = path.join(self.outdir, directory) dst = path.join(self.staticdir, directory) if path.isdir(src): if path.isdir(dst): shutil.rmtree(dst) shutil.move(src, dst)
def handle_finish(self): # get global values for css and script files _, doc_ctx = self._render_page("tmp", {}, "page.html") self.globalcontext["css"] = doc_ctx["css"] self.globalcontext["script"] = doc_ctx["script"] PickleHTMLBuilder.handle_finish(self) # move static stuff over to separate directory directories = ["_images", "_static"] for directory in directories: src = path.join(self.outdir, directory) dst = path.join(self.staticdir, directory) if path.isdir(src): if path.isdir(dst): shutil.rmtree(dst) shutil.move(src, dst)
def prepare_writing(self, docnames): PickleHTMLBuilder.prepare_writing(self, docnames) self.globalcontext['no_search_suffix'] = True
def prepare_writing(self, docnames): # type: (Iterable[str]) -> None PickleHTMLBuilder.prepare_writing(self, docnames) self.globalcontext['no_search_suffix'] = True
def prepare_writing(self, docnames): # type: (Iterable[unicode]) -> None PickleHTMLBuilder.prepare_writing(self, docnames) self.globalcontext['no_search_suffix'] = True
def prepare_writing(self, docnames): PickleHTMLBuilder.prepare_writing(self, docnames) self.docsettings.initial_header_level = 2