Skip to content

Commit 116ec29

Browse files
committedMay 9, 2015
allow different asciidoc binaries
1 parent 75a2f72 commit 116ec29

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

Diff for: ‎v7/asciidoc/asciidoc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ class CompileAsciiDoc(PageCompiler):
5151

5252
def compile_html(self, source, dest, is_two_file=True):
5353
makedirs(os.path.dirname(dest))
54+
binary = self.site.options.get('ASCIIDOC_BINARY', 'asciidoc')
5455
try:
55-
subprocess.check_call(('asciidoc', '-b', 'html5', '-s', '-o', dest, source))
56+
subprocess.check_call((binary, '-b', 'html5', '-s', '-o', dest, source))
5657
except OSError as e:
5758
if e.strreror == 'No such file or directory':
5859
req_missing(['asciidoc'], 'build this site (compile with asciidoc)', python=False)

Diff for: ‎v7/asciidoc/conf.py.sample

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ COMPILERS["asciidoc"] = ('.asc',)
44
# Add asciidoc files to your POSTS, PAGES
55
POSTS = POSTS + (("posts/*.asc", "posts", "post.tmpl"),)
66
PAGES = PAGES + (("stories/*.asc", "posts", "post.tmpl"),)
7+
8+
# You can choose what command to use for processing.
9+
# For example, you can replace asciidoc with asciidoctor
10+
# Or use the full path to the program.
11+
# ASCIIDOC_BINARY = "asciidoc"

0 commit comments

Comments
 (0)
Please sign in to comment.