We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99c6321 commit d43af7aCopy full SHA for d43af7a
src/renderer/html_handlebars/hbs_renderer.rs
@@ -298,6 +298,11 @@ impl HtmlHandlebars {
298
ch.name.clone() + " - " + book_title
299
};
300
301
+ let slug = Path::new(&ctx_path)
302
+ .file_stem()
303
+ .with_context(|| "Could not remove extension from path")?;
304
+
305
+ ctx.data.insert("slug".to_owned(), json!(slug.to_str()));
306
ctx.data.insert("path".to_owned(), json!(path));
307
ctx.data.insert("content".to_owned(), json!(content));
308
ctx.data.insert("chapter_title".to_owned(), json!(ch.name));
0 commit comments