mirror of
https://github.com/sigmasternchen/grimoire
synced 2025-03-15 08:08:55 +00:00
fix: Reverse order in which entries are rendered
This commit is contained in:
parent
5f749559f1
commit
9c93673cd5
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,8 @@ jinja_env = Environment(
|
||||||
def render_templates(data, context, config):
|
def render_templates(data, context, config):
|
||||||
files_written = 0
|
files_written = 0
|
||||||
|
|
||||||
for entry in data:
|
# render templates in reverse order, so included renderings can be used
|
||||||
|
for entry in data.reversed():
|
||||||
if "template" in entry:
|
if "template" in entry:
|
||||||
template_path = os.path.realpath(os.path.dirname(entry["filename"]) + "/" + entry["template"])
|
template_path = os.path.realpath(os.path.dirname(entry["filename"]) + "/" + entry["template"])
|
||||||
template_dir = os.path.dirname(template_path)
|
template_dir = os.path.dirname(template_path)
|
||||||
|
|
Loading…
Reference in a new issue