diff options
author | tk0miya <i.tkomiya@gmail.com> | 2014-09-27 10:11:47 +0900 |
---|---|---|
committer | tk0miya <i.tkomiya@gmail.com> | 2014-09-27 10:11:47 +0900 |
commit | cc5859fcbf086bcc6a25787dc3520e444f5b7282 (patch) | |
tree | 08eb1fc6c6e9d653544146ab5b463aefd177a296 /sphinx/builders/websupport.py | |
parent | 7984f81a5e8a9e533559ffffd2907c1d82be8292 (diff) | |
download | sphinx-git-cc5859fcbf086bcc6a25787dc3520e444f5b7282.tar.gz |
Add imgpath property to all builders
Diffstat (limited to 'sphinx/builders/websupport.py')
-rw-r--r-- | sphinx/builders/websupport.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py index 7b0e6f724..0a99b5021 100644 --- a/sphinx/builders/websupport.py +++ b/sphinx/builders/websupport.py @@ -58,7 +58,8 @@ class WebSupportBuilder(PickleHTMLBuilder): doctree.settings = self.docsettings self.secnumbers = self.env.toc_secnumbers.get(docname, {}) - self.imgpath = '/' + posixpath.join(self.virtual_staticdir, '_images') + self.imgpath = '/' + posixpath.join(self.virtual_staticdir, self.imagedir) + print self.imgpath self.dlpath = '/' + posixpath.join(self.virtual_staticdir, '_downloads') self.current_docname = docname self.docwriter.write(doctree, destination) @@ -70,7 +71,8 @@ class WebSupportBuilder(PickleHTMLBuilder): self.handle_page(docname, ctx, event_arg=doctree) def write_doc_serialized(self, docname, doctree): - self.imgpath = '/' + posixpath.join(self.virtual_staticdir, '_images') + self.imgpath = '/' + posixpath.join(self.virtual_staticdir, self.imagedir) + print self.imgpath self.post_process_images(doctree) title = self.env.longtitles.get(docname) title = title and self.render_partial(title)['title'] or '' @@ -148,7 +150,8 @@ class WebSupportBuilder(PickleHTMLBuilder): PickleHTMLBuilder.handle_finish(self) # move static stuff over to separate directory - directories = ['_images', '_static'] + directories = [self.imagedir, '_static'] + print directories for directory in directories: src = path.join(self.outdir, directory) dst = path.join(self.staticdir, directory) |