From f797bb14f7413df2abac6326c6df769004e50aa1 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Mon, 1 May 2023 09:35:25 -0600 Subject: small bugfix, add toc settings, update example site and delete unnecessary static assets --- src/pyssg/md_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pyssg/md_parser.py b/src/pyssg/md_parser.py index d652da9..97443f0 100644 --- a/src/pyssg/md_parser.py +++ b/src/pyssg/md_parser.py @@ -7,6 +7,7 @@ from markdown import Markdown from yafg import YafgExtension from pymdvar import VariableExtension from markdown_checklist.extension import ChecklistExtension +from markdown.extensions.toc import TocExtension from .database import Database from .page import Page @@ -21,8 +22,9 @@ def get_md_obj(variables: dict[str, str], 'meta', 'sane_lists', 'smarty', - 'toc', 'wikilinks', + TocExtension(permalink=True, + baselevel=2), VariableExtension(variables=variables, enable_env=enable_env), # stripTitle generates an error when True, @@ -65,8 +67,8 @@ class MDParser: self.pymdvar_vars = pymdvar['variables'] if 'enable_env' in pymdvar and type(pymdvar['enable_env']) == bool: self.pymdvar_enable_env = pymdvar['enable_env'] - log.warning('pymdvar_variables: %s', self.pymdvar_vars) - log.warning('pymdvar_enable_env: %s', self.pymdvar_enable_env) + log.debug('pymdvar_variables: %s', self.pymdvar_vars) + log.debug('pymdvar_enable_env: %s', self.pymdvar_enable_env) self.md: Markdown = get_md_obj(self.pymdvar_vars, self.pymdvar_enable_env) -- cgit v1.2.3-70-g09d2