Skip to content
Permalink
Browse files

allow different asciidoc binaries

  • Loading branch information
ralsina committed May 9, 2015
1 parent 75a2f72 commit 116ec290259188cb5cd170c272d945d11ecda5cc
Showing with 7 additions and 1 deletion.
  1. +2 −1 v7/asciidoc/asciidoc.py
  2. +5 −0 v7/asciidoc/conf.py.sample
@@ -51,8 +51,9 @@ class CompileAsciiDoc(PageCompiler):

def compile_html(self, source, dest, is_two_file=True):
makedirs(os.path.dirname(dest))
binary = self.site.options.get('ASCIIDOC_BINARY', 'asciidoc')
try:
subprocess.check_call(('asciidoc', '-b', 'html5', '-s', '-o', dest, source))
subprocess.check_call((binary, '-b', 'html5', '-s', '-o', dest, source))
except OSError as e:
if e.strreror == 'No such file or directory':
req_missing(['asciidoc'], 'build this site (compile with asciidoc)', python=False)
@@ -4,3 +4,8 @@ COMPILERS["asciidoc"] = ('.asc',)
# Add asciidoc files to your POSTS, PAGES
POSTS = POSTS + (("posts/*.asc", "posts", "post.tmpl"),)
PAGES = PAGES + (("stories/*.asc", "posts", "post.tmpl"),)

# You can choose what command to use for processing.
# For example, you can replace asciidoc with asciidoctor
# Or use the full path to the program.
# ASCIIDOC_BINARY = "asciidoc"

0 comments on commit 116ec29

Please sign in to comment.
You can’t perform that action at this time.