diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2023-05-01 09:35:25 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2023-05-01 09:35:25 -0600 |
commit | f797bb14f7413df2abac6326c6df769004e50aa1 (patch) | |
tree | 20850afbf9d45adbbcc6fc3a7aecedfa34db830c /src | |
parent | 127130ab909dac8886f45ec856f1d1bce3c7bcc0 (diff) |
small bugfix, add toc settings, update example site and delete unnecessary static assets
Diffstat (limited to 'src')
-rw-r--r-- | src/pyssg/md_parser.py | 8 |
1 files changed, 5 insertions, 3 deletions
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) |