diff --git a/src/subreddit.rs b/src/subreddit.rs index 9f0bdca..7c33fd4 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -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 { let s = WikiTemplate { sub: sub.to_string(), wiki: res["data"]["content_html"].as_str().unwrap().to_string(), + page: page.to_string() } .render() .unwrap(); diff --git a/templates/wiki.html b/templates/wiki.html index fa0cad8..c2244c2 100644 --- a/templates/wiki.html +++ b/templates/wiki.html @@ -2,7 +2,7 @@ {% import "utils.html" as utils %} {% block title %} - {% if sub != "" %}{{ sub }} + {% if sub != "" %}{{ page }} - {{ sub }} {% else %}Libreddit{% endif %} {% endblock %}