Skip to content

Commit 06f9eb6

Browse files
committed
fix: change the naming of a variable
1 parent a5dca93 commit 06f9eb6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/renderer/html_handlebars/hbs_renderer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl HtmlHandlebars {
306306

307307
let slug = ctx_path.replace(".md", "");
308308

309-
let mut base_url = if let Some(site_url) = &ctx.html_config.site_url {
309+
let mut site_url = if let Some(site_url) = &ctx.html_config.site_url {
310310
site_url.clone()
311311
} else {
312312
debug!(
@@ -317,7 +317,7 @@ impl HtmlHandlebars {
317317
String::from("/")
318318
};
319319

320-
ctx.data.insert("base_url".to_owned(), json!(base_url));
320+
ctx.data.insert("site_url".to_owned(), json!(site_url));
321321
ctx.data.insert("slug".to_owned(), json!(slug));
322322
ctx.data.insert("path".to_owned(), json!(path));
323323
ctx.data.insert("content".to_owned(), json!(content));

src/theme/index.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
{{> head}}
1717

1818
{{#if (eq slug "title-page") }}
19-
<link rel="canonical" href="{{ base_url }}/" />
19+
<link rel="canonical" href="{{ site_url }}/" />
2020
{{else}}
21-
<link rel="canonical" href="{{ base_url }}/{{ slug }}" />
21+
<link rel="canonical" href="{{ site_url }}/{{ slug }}" />
2222
{{/if}}
2323

2424
<meta name="description" content="{{ description }}">

0 commit comments

Comments
 (0)