chore: fix update to 0.4.40 with absolute links via site-url
This commit is contained in:
parent
e1235853e3
commit
7ad069e632
1 changed files with 6 additions and 2 deletions
|
|
@ -53,8 +53,12 @@ impl HtmlHandlebars {
|
||||||
ctx.data
|
ctx.data
|
||||||
.insert("git_repository_edit_url".to_owned(), json!(edit_url));
|
.insert("git_repository_edit_url".to_owned(), json!(edit_url));
|
||||||
}
|
}
|
||||||
|
let content = if let Some(site_url) = &ctx.html_config.site_url {
|
||||||
let content = utils::render_markdown(&ch.content, ctx.html_config.smart_punctuation());
|
let ch = ch.content.clone().replace("](./",&format!("]({}",site_url));
|
||||||
|
utils::render_markdown(&ch, ctx.html_config.smart_punctuation())
|
||||||
|
} else {
|
||||||
|
utils::render_markdown(&ch.content, ctx.html_config.smart_punctuation())
|
||||||
|
};
|
||||||
|
|
||||||
let fixed_content = utils::render_markdown_with_path(
|
let fixed_content = utils::render_markdown_with_path(
|
||||||
&ch.content,
|
&ch.content,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue