From e166a1f2a4fc523741c27d4ae4dade870459d563 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Wed, 22 Feb 2023 16:28:55 +0900 Subject: [PATCH] Pass `path_html` to HTML renderer When linking between translations, we can use `path_html` instead of changing .md to .html with `path`. --- src/renderer/html_handlebars/hbs_renderer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index e1e99fd6..a6874ffc 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -94,6 +94,7 @@ impl HtmlHandlebars { }; ctx.data.insert("path".to_owned(), json!(path)); + ctx.data.insert("path_html".to_owned(), json!(filepath)); ctx.data.insert("content".to_owned(), json!(content)); ctx.data.insert("chapter_title".to_owned(), json!(ch.name)); ctx.data.insert("title".to_owned(), json!(title));