Skip to content

Commit

Permalink
Support publishing both html and then markdown to the same location
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnt committed Feb 20, 2017
1 parent 55427f2 commit 09e239e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doorstop/core/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def publish(obj, path, ext=None, linkify=None, index=None,
else:
os.makedirs(assets_dir)

if ext == '.html':
if not template:
template = HTMLTEMPLATE
template_assets = os.path.join(os.path.dirname(template), 'assets')
if os.path.isdir(template_assets):
log.info("Copying %s to %s", template_assets, assets_dir)
common.copy_dir_contents(template_assets, assets_dir)
# If publish html and then markdown ensure that the html template are still available
if not template:
template = HTMLTEMPLATE
template_assets = os.path.join(os.path.dirname(template), 'assets')
if os.path.isdir(template_assets):
log.info("Copying %s to %s", template_assets, assets_dir)
common.copy_dir_contents(template_assets, assets_dir)

# Publish documents
count = 0
Expand Down

0 comments on commit 09e239e

Please sign in to comment.