Skip to content

Commit

Permalink
chore: favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Nov 20, 2024
1 parent 1db0470 commit 3c7a71e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file added content/assets/favicon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async fn main() {
.route("/:year/:month/:day/:slug", get(redirect_old_routes))
.route("/feed.xml", get(atom_feed).layer(CacheLayer::with_lifespan(RESPONSE_CACHE_TTL)))
.route("/pageview", post(store_pageview))
.route("/favicon.ico", get(favicon))
.fallback(not_found)
.with_state(app_state.clone());

Expand Down Expand Up @@ -159,6 +160,10 @@ async fn about() -> Redirect {
Redirect::temporary("/")
}

async fn favicon() -> Redirect {
Redirect::permanent("/assets/favicon.ico")
}

#[derive(Debug, Serialize)]
struct Post {
slug: String,
Expand Down
1 change: 1 addition & 0 deletions src/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/assets/favicon.ico">
<title>{% block title %}Ankush Menat{% endblock %}</title>
<meta property="og:site_name" content="Ankush Menat">
{% block meta %}{% endblock %}
Expand Down

0 comments on commit 3c7a71e

Please sign in to comment.