From e0277641a293b7d13026c76fa599d203325dab8b Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Tue, 2 Jan 2024 19:32:00 +0000 Subject: [PATCH] fix plaintext files not showing properly --- gronk.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gronk.py b/gronk.py index 275d771..dbbff3c 100755 --- a/gronk.py +++ b/gronk.py @@ -198,6 +198,7 @@ class FileMap: r['raw'] = self.output_dir.joinpath( input_filepath.relative_to(self.input_dir)) r['web'] = webpath(r['html']) + r['web_raw'] = webpath(r['raw']) return r @@ -288,7 +289,11 @@ def render_plaintext_file(input_filepath): raw_content = input_filepath.read_text() properties = FILEMAP.get(input_filepath) - html = JINJA_TEMPLATE_TEXTARTICLE.render(license=LICENSE, **properties) + html = JINJA_TEMPLATE_TEXTARTICLE.render( + license=LICENSE, + **properties, + raw_link=properties['dst_path']['web_raw'], + raw_content=raw_content) properties['dst_path']['raw'].write_text(raw_content) properties['dst_path']['html'].write_text(html)