Skip to content

Commit 3b506a8

Browse files
committed
fix: remove slug from the chapter list in case of index.html
1 parent 0b3ed06 commit 3b506a8

File tree

1 file changed

+2
-1
lines changed
  • src/renderer/html_handlebars/helpers

1 file changed

+2
-1
lines changed

src/renderer/html_handlebars/helpers/toc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ impl HelperDef for RenderToc {
136136
.to_str()
137137
.unwrap()
138138
// Hack for windows who tends to use `\` as separator instead of `/`
139-
.replace('\\', "/");
139+
.replace('\\', "/")
140+
.replace("/index.html", "/");
140141

141142
// Add link
142143
out.write(&utils::fs::path_to_root(&current_path))?;

0 commit comments

Comments
 (0)