implement semantic titles for search and pagination requests

This commit is contained in:
yggverse 2025-09-09 12:12:31 +03:00
parent fbb15ed8e7
commit 164e562acd

View file

@ -319,7 +319,23 @@ fn list(state: &State, keyword: Option<&str>, page: Option<usize>) -> Result<Str
let mut b = Vec::new();
b.push(format!("# {}\n", state.name));
b.push(format!("# {}\n", {
let mut h = String::new();
if let Some(k) = keyword {
h.push_str(k);
h.push_str("");
}
if let Some(p) = page
&& p > 1
{
h.push_str(&format!("Page {p}"));
}
h.push_str(&state.name);
h
}));
if let Some(ref description) = state.description {
b.push(format!("{description}\n"));