Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 74272159ff77^
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 04c0511865e2
Choose a head ref
  • 5 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 17, 2015

  1. Copy the full SHA
    7427215 View commit details
  2. Copy the full SHA
    23a5c54 View commit details
  3. Copy the full SHA
    ccd37a5 View commit details
  4. Copy the full SHA
    0fb6264 View commit details
  5. Fix #1523

    ralsina committed Jan 17, 2015
    Copy the full SHA
    04c0511 View commit details
Showing with 15 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +7 −1 nikola/plugins/compile/markdown/__init__.py
  3. +4 −0 nikola/plugins/compile/pandoc.py
  4. +3 −0 nikola/plugins/compile/rest/__init__.py
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ Bugfixes
--------

* Fixed compatibility with IPython 3.x (Issue #1581)
* Compilers mark tasks as out of date if compiler-specific options and plugins change (Issue #1523)

New in v7.3.0
=============
8 changes: 7 additions & 1 deletion nikola/plugins/compile/markdown/__init__.py
Original file line number Diff line number Diff line change
@@ -53,16 +53,18 @@ class CompileMarkdown(PageCompiler):
site = None

def set_site(self, site):
self.enabled_extensions = []
for plugin_info in site.plugin_manager.getPluginsOfCategory("MarkdownExtension"):
if plugin_info.name in site.config['DISABLED_PLUGINS']:
site.plugin_manager.removePluginFromCategory(plugin_info, "MarkdownExtension")
continue

self.enabled_extensions.append(plugin_info.name)
site.plugin_manager.activatePluginByName(plugin_info.name)
plugin_info.plugin_object.set_site(site)
self.extensions.append(plugin_info.plugin_object)
plugin_info.plugin_object.short_help = plugin_info.description

self.enabled_extensions += site.config.get("MARKDOWN_EXTENSIONS")
return super(CompileMarkdown, self).set_site(site)

def compile_html(self, source, dest, is_two_file=True):
@@ -96,3 +98,7 @@ def create_post(self, path, **kw):
fd.write(write_metadata(metadata))
fd.write('-->\n\n')
fd.write(content)

def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency_uptodate(self.enabled_extensions)
4 changes: 4 additions & 0 deletions nikola/plugins/compile/pandoc.py
Original file line number Diff line number Diff line change
@@ -70,3 +70,7 @@ def create_post(self, path, **kw):
fd.write(write_metadata(metadata))
fd.write('-->\n\n')
fd.write(content)

def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency_uptodate(self.site.config['PANDOC_OPTIONS'])
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/__init__.py
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def _read_extra_deps(self, post):
def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency(lambda: self._read_extra_deps(post), 'fragment')
post.add_dependency_uptodate(self.enabled_plugins)

def compile_html(self, source, dest, is_two_file=True):
"""Compile reSt into HTML."""
@@ -128,12 +129,14 @@ def create_post(self, path, **kw):
fd.write(content)

def set_site(self, site):
self.enabled_plugins = []
for plugin_info in site.plugin_manager.getPluginsOfCategory("RestExtension"):
if plugin_info.name in site.config['DISABLED_PLUGINS']:
site.plugin_manager.removePluginFromCategory(plugin_info, "RestExtension")
continue

site.plugin_manager.activatePluginByName(plugin_info.name)
self.enabled_plugins.append(plugin_info.name)
plugin_info.plugin_object.set_site(site)
plugin_info.plugin_object.short_help = plugin_info.description