Skip to content

Commit

Permalink
Fixed broken handling where you have css/js in the cfg file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Nov 5, 2015
1 parent 95b55f7 commit 6d11981
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/darkslide/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@ def __init__(self, source, **kwargs):
self.copy_theme = config.get('copy_theme', self.copy_theme)
self.extensions = config.get('extensions', self.extensions)
self.theme = config.get('theme', self.theme)
self.destination_dir = os.path.dirname(self.destination_file)
self.add_user_css(config.get('css', []))
self.add_user_js(config.get('js', []))
self.linenos = self.linenos_check(config.get('linenos', self.linenos))
self.math_output = config.get('math_output', self.math_output)
else:
self.source = source
self.work_dir = '.'
self.destination_dir = os.path.dirname(self.destination_file)

source_abspath = os.path.abspath(source)

if not os.path.isdir(source_abspath):
Expand All @@ -125,7 +128,6 @@ def __init__(self, source, **kwargs):
"destination")

self.theme_dir = self.find_theme_dir(self.theme, self.copy_theme)
self.destination_dir = os.path.dirname(self.destination_file)
self.template_file = self.get_template_file()

# macros registering
Expand Down

0 comments on commit 6d11981

Please sign in to comment.