mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
show pagination segment first in title
This commit is contained in:
parent
808b871549
commit
3a1a65b561
1 changed files with 6 additions and 5 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -51,15 +51,16 @@ fn index(
|
||||||
"index",
|
"index",
|
||||||
context! {
|
context! {
|
||||||
title: {
|
title: {
|
||||||
let mut t = meta.title.clone();
|
let mut t = String::new();
|
||||||
|
if let Some(p) = page && p > 1 {
|
||||||
|
t.push_str(&format!("Page {p}"));
|
||||||
|
t.push_str(S)
|
||||||
|
}
|
||||||
|
t.push_str(&meta.title);
|
||||||
if let Some(ref description) = meta.description {
|
if let Some(ref description) = meta.description {
|
||||||
t.push_str(S);
|
t.push_str(S);
|
||||||
t.push_str(description)
|
t.push_str(description)
|
||||||
}
|
}
|
||||||
if let Some(p) = page && p > 1 {
|
|
||||||
t.push_str(S);
|
|
||||||
t.push_str(&format!("Page {p}"));
|
|
||||||
}
|
|
||||||
t
|
t
|
||||||
},
|
},
|
||||||
meta: meta.inner(),
|
meta: meta.inner(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue