Adding basic RSS feed

This commit is contained in:
Awstin 2025-02-18 20:00:41 -05:00
parent 7a3efc2716
commit 8bb920e96a
2 changed files with 30 additions and 0 deletions

26
assets/feed.xml Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Awstin Chubb</title>
<link>https://achubb.com</link>
<description>My personal site</description>
<item>
<title>Monk & Robot</title>
<link>https://achubb.com/books/monk&robot</link>
</item>
<item>
<title>Conundrum</title>
<link>https://achubb.com/posts/conundrum</link>
</item>
<item>
<title>Let America Go</title>
<link>https://achubb.com/posts/lag</link>
</item>
<item>
<title>Canadian Tariffs</title>
<link>https://achubb.com/posts/ct</link>
</item>
</channel>
</rss>

View file

@ -66,6 +66,10 @@ pub fn get_router(pool: PgPool) -> Router {
"/robots.txt",
get(|| async { Redirect::permanent("/assets/robots.txt") }),
)
.route(
"/feed.xml",
get(|| async { Redirect::permanent("/assets/feed.xml") }),
)
.layer(axum::middleware::from_fn(move |req, next| {
auth(req, next, middleware_database.clone())
}))