summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2021-06-07 22:56:45 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2021-06-07 22:56:45 -0600
commit1476b8daddeb65866476d98ea951e45dbe48321d (patch)
tree130b93d0ad90095c0798efec420b6d8be1ea4754 /src
parent0bdbc47c335f51d36cf869115e8884ccd6a9eaaf (diff)
add new extensions
Diffstat (limited to 'src')
-rw-r--r--src/pyssg/pyssg.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py
index 3c75e3c..0978e63 100644
--- a/src/pyssg/pyssg.py
+++ b/src/pyssg/pyssg.py
@@ -1,10 +1,14 @@
import os
import shutil
+from importlib.resources import path
from argparse import ArgumentParser, Namespace
from typing import Union
+
from jinja2 import Environment, FileSystemLoader
from markdown import Markdown
-from importlib.resources import path
+import yafg
+from MarkdownHighlight.highlight import HighlightExtension
+from markdown_checklist.extension import ChecklistExtension
from .configuration import Configuration
from .database import Database
@@ -148,8 +152,23 @@ def main() -> None:
trim_blocks=True,
lstrip_blocks=True)
- md: Markdown = Markdown(extensions=['extra', 'meta', 'sane_lists',
- 'smarty', 'toc', 'wikilinks'],
+
+ # md extensions
+ exts: list = ['extra',
+ 'meta',
+ 'sane_lists',
+ 'smarty',
+ 'toc',
+ 'wikilinks',
+ yafg.YafgExtension(stripTitle=True,
+ figureClass="",
+ figcaptionClass="",
+ figureNumbering=False,
+ figureNumberClass="number",
+ figureNumberText="Figure"),
+ HighlightExtension,
+ ChecklistExtension()]
+ md: Markdown = Markdown(extensions=exts,
output_format='html5')
builder: Builder = Builder(config, env, db, md)
builder.build()