From 83604219e335cc6669487bf3b6ec88dfff4b5a7f Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Thu, 21 Sep 2023 10:15:23 -0500 Subject: [PATCH] expose post to the template --- markata/plugins/post_template.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/markata/plugins/post_template.py b/markata/plugins/post_template.py index db1f0fa5..9161a905 100644 --- a/markata/plugins/post_template.py +++ b/markata/plugins/post_template.py @@ -69,17 +69,17 @@ ``` """ +import inspect from pathlib import Path -from typing import List, TYPE_CHECKING, Union +from typing import TYPE_CHECKING, List, Union import jinja2 +import pydantic from jinja2 import Template, Undefined from more_itertools import flatten -import pydantic from markata import __version__ from markata.hookspec import hook_impl -import inspect env = jinja2.Environment() @@ -281,5 +281,6 @@ def render(markata: "Markata") -> None: body=article.html, toc=markata.md.toc, # type: ignore config=merged_config, + post=article, **article.metadata, )