import markdown


def markdownify_content(context):
    for article in context["articles"]:
        article["content"] = markdown.markdown(article["content"])
    return context


def inject_middlewares(middlewares):
    middlewares.add("markdownify_content", markdownify_content)

    return middlewares

@@ -14,43 +14,268 @@
 wn%0A%0A
-%0Adef markdownify_content(context):%0A
+import helpers%0A%0A%0Alogger = helpers.get_logger(__name__)%0A%0A%0Adef markdownify_content(context):%0A    if context%5B%22is_called_from_cli%22%5D:%0A%0A        arg_parser = context%5B%22arg_parser%22%5D%0A        args = arg_parser.parse_args()%0A%0A        if args.action == %22generate%22:%0A%0A        
     
@@ -318,16 +318,24 @@
         
+      
+  
 article%5B
@@ -385,16 +385,152 @@
 tent%22%5D)%0A
+%0A                logger.debug(%22Parsing content to Markdown for %60%7B%7D%60 article...%22%0A                            .format(article%5B%22title%22%5D))%0A%0A
     retu

Fix markdown plugin so it's run only when needed