Skip to content

Commit

Permalink
Compatibility with Nikola v8.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Jan 10, 2024
1 parent f559f41 commit 396a689
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion site/conf.py
Expand Up @@ -920,7 +920,7 @@

# A small copyright notice for the page footer (in HTML).
# (translatable)
CONTENT_FOOTER = '''Contents © 2012–2023 <a href="https://getnikola.com/contact.html">The Nikola contributors</a> and plugin authors&nbsp;&nbsp;|&nbsp;&nbsp;Powered by <a href="https://getnikola.com/">Nikola</a> itself&nbsp;&nbsp;|&nbsp;&nbsp;
CONTENT_FOOTER = '''Contents © 2012–2024 <a href="https://getnikola.com/contact.html">The Nikola contributors</a> and plugin authors&nbsp;&nbsp;|&nbsp;&nbsp;Powered by <a href="https://getnikola.com/">Nikola</a> itself&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://twitter.com/intent/user?screen_name=GetNikola">Follow Nikola on Twitter</a>&nbsp;&nbsp;|&nbsp;&nbsp;Theme is <a href="http://bootswatch.com/cerulean/">Cerulean</a>
'''
# Things that will be passed to CONTENT_FOOTER.format(). This is done
Expand Down
6 changes: 5 additions & 1 deletion v8/micro/micro.py
Expand Up @@ -47,5 +47,9 @@ def _execute(self, options, args):
options['schedule'] = False
options['is_page'] = False
options['date-path'] = False
p = self.site.plugin_manager.getPluginByName('new_post', 'Command').plugin_object
try:
p = self.site.plugin_manager.get_plugin_by_name('new_post', 'Command').plugin_object
except AttributeError:
# Name changed in Nikola v8.3.0
p = self.site.plugin_manager.getPluginByName('new_post', 'Command').plugin_object
return p.execute(options, args)
6 changes: 5 additions & 1 deletion v8/plantuml_markdown/plantuml_markdown.py
Expand Up @@ -25,7 +25,11 @@ def __init__(self, md, config, site, logger):
def plantuml_manager(self):
"""PlantUmlManager instance from the "plantuml" plugin"""
if not self._plantuml_manager:
plugin_info = self._site.plugin_manager.getPluginByName('plantuml', category='Task')
try:
plugin_info = self._site.plugin_manager.get_plugin_by_name('plantuml', category='Task')
except AttributeError:
# Name changed in Nikola v8.3.0
plugin_info = self._site.plugin_manager.getPluginByName('plantuml', category='Task')
if not plugin_info:
req_missing("plantuml plugin", "use the plantuml_markdown plugin", python=False)
self._plantuml_manager = plugin_info.plugin_object.plantuml_manager
Expand Down

0 comments on commit 396a689

Please sign in to comment.