Fix Wiki Titles

This commit is contained in:
spikecodes 2021-01-01 22:34:25 -08:00
parent 0925a9b334
commit 779de6f8af
2 changed files with 3 additions and 1 deletions

View File

@ -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();

View File

@ -2,7 +2,7 @@
{% import "utils.html" as utils %}
{% block title %}
{% if sub != "" %}{{ sub }}
{% if sub != "" %}{{ page }} - {{ sub }}
{% else %}Libreddit{% endif %}
{% endblock %}