From 4f2dc24cc36733ed0dae2dc385c1b6c08b9bd4ab Mon Sep 17 00:00:00 2001 From: Eduardo Blancas Date: Mon, 25 Mar 2024 15:30:55 -0600 Subject: [PATCH] adding jupyblog version to rendered version, fixing mistune version --- setup.py | 2 +- src/jupyblog/md.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 56f569e..9862495 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def read(*names, **kwargs): "jupytext", "parso", "pydantic", - "mistune>=2.0", + "mistune>=2.0,<3", "ploomber-core>=0.0.4", "nbformat", ] diff --git a/src/jupyblog/md.py b/src/jupyblog/md.py index 7cf712e..4510788 100644 --- a/src/jupyblog/md.py +++ b/src/jupyblog/md.py @@ -21,6 +21,8 @@ from jupyblog.exceptions import InvalidFrontMatter, InputPostException from jupyblog.utm import add_utm_to_all_urls, add_utm_to_url from jupyblog.ast import MarkdownAST, create_md_parser +from jupyblog import __version__ + logger = logging.getLogger(__name__) @@ -322,6 +324,9 @@ def render(self, name, *, include_source_in_footer, metadata=None): if date_existing: metadata["date"] = date_existing + # add the jupyblog version + metadata["jupyblog"]["version_jupysql"] = __version__ + if self._footer_template: md_out = add_footer( md_out,