grimoire-ssg/grimoiressg/modules/markdown.py

11 lines
319 B
Python
Raw Permalink Normal View History

import markdown
2025-01-10 17:53:57 +00:00
from grimoiressg.utils import logger
2025-01-12 21:09:19 +00:00
def compile_markdown(data, context, config):
for entry in data:
if "markdown" in entry:
2025-01-10 17:53:57 +00:00
logger.debug("Compiling markdown for %s...", entry['relative_filename'])
entry["markdown_compiled"] = markdown.markdown(entry["markdown"])