makesite: Add the variable file_name

This commit is contained in:
PapaTutuWawa 2021-11-28 14:56:14 +01:00
parent 2b54284d2d
commit a1eb445bff

View File

@ -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)