Fix Wiki Titles
This commit is contained in:
parent
0925a9b334
commit
779de6f8af
@ -18,6 +18,7 @@ struct SubredditTemplate {
|
||||
struct WikiTemplate {
|
||||
sub: String,
|
||||
wiki: String,
|
||||
page: String
|
||||
}
|
||||
|
||||
// SERVICES
|
||||
@ -58,6 +59,7 @@ pub async fn wiki(req: HttpRequest) -> Result<HttpResponse> {
|
||||
let s = WikiTemplate {
|
||||
sub: sub.to_string(),
|
||||
wiki: res["data"]["content_html"].as_str().unwrap().to_string(),
|
||||
page: page.to_string()
|
||||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% import "utils.html" as utils %}
|
||||
|
||||
{% block title %}
|
||||
{% if sub != "" %}{{ sub }}
|
||||
{% if sub != "" %}{{ page }} - {{ sub }}
|
||||
{% else %}Libreddit{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user