💬 Add a title and description for search

This commit is contained in:
Kazhnuz 2025-09-11 10:27:21 +02:00
parent 6f359c5aea
commit be919d9c2e
3 changed files with 20 additions and 2 deletions

View file

@ -151,6 +151,13 @@ class Theme
} catch (Exception $e) {
// Kind doesn't exist
}
} elseif ($WHERE_AM_I == 'search') {
try {
$searchKey = explode("/", $url->slug());
return $L->parse("all-post-search", ["search"=>$searchKey[1]]);
} catch (Exception $e) {
// Kind doesn't exist
}
} elseif ($WHERE_AM_I == 'home') {
return $L->get("Latest articles");
}
@ -211,6 +218,13 @@ class Theme
} catch (Exception $e) {
// Kind doesn't exist
}
} elseif ($WHERE_AM_I == 'search') {
try {
global $numberOfItems;
return $L->parse("nbr-results-found", ["results"=>$numberOfItems]);
} catch (Exception $e) {
// Kind doesn't exist
}
} elseif ($WHERE_AM_I == 'home') {
return $L->get("all-post");
}

View file

@ -421,6 +421,8 @@
"all-post-archive": "All posts written in",
"all-post-author": "All posts written by",
"all-post-kind": "All posts using the following format :",
"all-post": "All the latest posts written on the blog"
"all-post-search": "All results for search \"%search%\"",
"all-post": "All the latest posts written on the blog",
"nbr-results-found": "%results% result(s) found"
}

View file

@ -432,5 +432,7 @@
"all-post-archive": "Tous les articles écrits en",
"all-post-author": "Tous les articles écrits par",
"all-post-kind": "Tous les post utilisant le format suivant :",
"all-post": "Tout les articles écrits récemment sur le blog"
"all-post-search": "Résultats de la recherche « %search% »",
"all-post": "Tout les articles écrits récemment sur le blog",
"nbr-results-found": "%results% résultat(s) trouvés"
}