summaryrefslogtreecommitdiff
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
parent0bdbc47c335f51d36cf869115e8884ccd6a9eaaf (diff)
add new extensions
-rw-r--r--ChangeLog5
-rw-r--r--README.md3
-rw-r--r--requirements.txt3
-rw-r--r--src/pyssg/pyssg.py25
4 files changed, 33 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c9f56f..e77d59e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
CHANGES
=======
+v0.5.7
+------
+
+* fix bug on prev/next objects of page
+
v0.5.6
------
diff --git a/README.md b/README.md
index ab0fe9b..d4d1f12 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,9 @@ This program uses the base [`markdown` syntax](https://daringfireball.net/projec
- SmartyPants.
- Table of Contents.
- WikiLinks.
+- [yafg - Yet Another Figure Generator](https://git.sr.ht/~ferruck/yafg)
+- [markdown.highlight](https://github.com/ribalba/markdown.highlight)
+- [Markdown Checklist](https://github.com/FND/markdown-checklist)
## Installation
diff --git a/requirements.txt b/requirements.txt
index 248a5ba..c62a881 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,5 @@
markdown==3.3.4
jinja2==3.0.1
+yafg==0.3
+MarkdownHighlight==0.1.3
+markdown-checklist==0.4.3
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()