From a1eb445bff7af3a0f3770293fb28f23ffc24d93a Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 28 Nov 2021 14:56:14 +0100 Subject: [PATCH] makesite: Add the variable file_name --- makesite.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makesite.py b/makesite.py index 05e41a8..d866ca9 100644 --- a/makesite.py +++ b/makesite.py @@ -141,6 +141,8 @@ def make_pages(src, dst, layout, **params): if 'params' in content: page_params.update(**json.loads(open(content['params'], 'r').read())) + page_params['file_name'] = os.path.basename(src_path) + # Populate placeholders in content if content-rendering is enabled. if page_params.get('render') == 'yes': rendered_content = render(page_params['content'], **page_params)