mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 09:05:30 +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",
|
||||
context! {
|
||||
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 {
|
||||
t.push_str(S);
|
||||
t.push_str(description)
|
||||
}
|
||||
if let Some(p) = page && p > 1 {
|
||||
t.push_str(S);
|
||||
t.push_str(&format!("Page {p}"));
|
||||
}
|
||||
t
|
||||
},
|
||||
meta: meta.inner(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue