Skip to content

Commit

Permalink
fix #1492
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Dec 5, 2014
1 parent 7b4c20b commit 1f4d100
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,7 @@ New in master
Features
--------

* New PANDOC_OPTIONS option (Issue #1492)
* New tab-width option in code-block directive (Issue #1514)
* New option TAG_PAGES_DESCRIPTIONS for optionally making individual
tag pages more unique and interesting (Issue #1486)
Expand Down
7 changes: 6 additions & 1 deletion nikola/conf.py.in
Expand Up @@ -169,7 +169,7 @@ PAGES = ${PAGES}
# FILES_FOLDERS = {'files': ''}
# Which means copy 'files' into 'output'

# One or more folders containing listings to be processed and stored into
# One or more folders containing listings to be processed and stored into
# the output. The format is a dictionary of {source: relative destination}.
# Default is:
# LISTINGS_FOLDERS = {'listings': 'listings'}
Expand Down Expand Up @@ -600,6 +600,11 @@ COMMENT_SYSTEM_ID = ${COMMENT_SYSTEM_ID}
# with the MarkdownExtension class and should not be added here.
# MARKDOWN_EXTENSIONS = ['fenced_code', 'codehilite']

# Extra options to pass to the pandoc comand.
# by default, it's empty, is a list of strings, for example
# ['-F', 'pandoc-citeproc', '--bibliography=/Users/foo/references.bib']
# PANDOC_OPTIONS = []

# Social buttons. This is sample code for AddThis (which was the default for a
# long time). Insert anything you want here, or even make it empty.
# (translatable)
Expand Down
1 change: 1 addition & 0 deletions nikola/nikola.py
Expand Up @@ -345,6 +345,7 @@ def __init__(self, **config):
'OUTPUT_FOLDER': 'output',
'POSTS': (("posts/*.txt", "posts", "post.tmpl"),),
'PAGES': (("stories/*.txt", "stories", "story.tmpl"),),
'PANDOC_OPTIONS': [],
'PRETTY_URLS': False,
'FUTURE_IS_NOW': False,
'INDEX_READ_MORE_LINK': DEFAULT_INDEX_READ_MORE_LINK,
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/pandoc.py
Expand Up @@ -48,7 +48,7 @@ class CompilePandoc(PageCompiler):
def compile_html(self, source, dest, is_two_file=True):
makedirs(os.path.dirname(dest))
try:
subprocess.check_call(('pandoc', '-o', dest, source))
subprocess.check_call(['pandoc', '-o', dest, source] + self.site.config['PANDOC_OPTIONS'])
except OSError as e:
if e.strreror == 'No such file or directory':
req_missing(['pandoc'], 'build this site (compile with pandoc)', python=False)
Expand Down

0 comments on commit 1f4d100

Please sign in to comment.