|
@@ -68,7 +68,7 @@ def pelican_init(pelicanobj):
|
|
""" Prepare configurations for the MD plugin """
|
|
""" Prepare configurations for the MD plugin """
|
|
try:
|
|
try:
|
|
import markdown
|
|
import markdown
|
|
- from plantuml_md import PlantUMLMarkdownExtension
|
|
|
|
|
|
+ from .plantuml_md import PlantUMLMarkdownExtension
|
|
except:
|
|
except:
|
|
# Markdown not available
|
|
# Markdown not available
|
|
logger.debug("[plantuml] Markdown support not available")
|
|
logger.debug("[plantuml] Markdown support not available")
|
|
@@ -78,7 +78,11 @@ def pelican_init(pelicanobj):
|
|
config = { 'siteurl': pelicanobj.settings['SITEURL'] }
|
|
config = { 'siteurl': pelicanobj.settings['SITEURL'] }
|
|
|
|
|
|
try:
|
|
try:
|
|
- pelicanobj.settings['MD_EXTENSIONS'].append(PlantUMLMarkdownExtension(config))
|
|
|
|
|
|
+ if 'MD_EXTENSIONS' in pelicanobj.settings.keys(): # pre pelican 3.7.0
|
|
|
|
+ pelicanobj.settings['MD_EXTENSIONS'].append(PlantUMLMarkdownExtension(config))
|
|
|
|
+ elif 'MARKDOWN' in pelicanobj.settings.keys() and \
|
|
|
|
+ not ('extension_configs' in pelicanobj.settings['MARKDOWN']['extension_configs']): # from pelican 3.7.0
|
|
|
|
+ pelicanobj.settings['MARKDOWN']['extension_configs']['plantuml.plantuml_md'] = {}
|
|
except:
|
|
except:
|
|
logger.error("[plantuml] Unable to configure plantuml markdown extension")
|
|
logger.error("[plantuml] Unable to configure plantuml markdown extension")
|
|
|
|
|