From 81f6998b4e3763df1f531511e7d33fd46e7f7c26 Mon Sep 17 00:00:00 2001 From: Pantonshire Date: Fri, 27 May 2022 11:29:43 +0100 Subject: [PATCH] Link to atom and rss feeds in head --- blog_server/src/service/index.rs | 2 ++ blog_server/src/service/post.rs | 2 ++ blog_server/src/service/posts_list.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/blog_server/src/service/index.rs b/blog_server/src/service/index.rs index 2c5fee2..f5ae44a 100644 --- a/blog_server/src/service/index.rs +++ b/blog_server/src/service/index.rs @@ -13,6 +13,8 @@ pub async fn handle(Extension(posts): Extension) -> Html { .with_crawler_permissive() .with_head(html! { link href="/static/styles/main.css" rel="stylesheet"; + link rel="alternate" type="application/atom+xml" href="/atom.xml"; + link rel="alternate" type="application/rss+xml" href="/rss.xml"; }) .with_body(template::main_page(html! { section .content_section { diff --git a/blog_server/src/service/post.rs b/blog_server/src/service/post.rs index 83cff61..05fd8a8 100644 --- a/blog_server/src/service/post.rs +++ b/blog_server/src/service/post.rs @@ -22,6 +22,8 @@ pub async fn handle( .with_head(html! { link href="/static/styles/main.css" rel="stylesheet"; link href="/static/styles/code.css" rel="stylesheet"; + link rel="alternate" type="application/atom+xml" href="/atom.xml"; + link rel="alternate" type="application/rss+xml" href="/rss.xml"; }) .with_body(template::main_page(html! { section .article_header { diff --git a/blog_server/src/service/posts_list.rs b/blog_server/src/service/posts_list.rs index 4392b65..0d18b2b 100644 --- a/blog_server/src/service/posts_list.rs +++ b/blog_server/src/service/posts_list.rs @@ -13,6 +13,8 @@ pub async fn handle(Extension(posts): Extension) -> Html { .with_crawler_permissive() .with_head(html! { link href="/static/styles/main.css" rel="stylesheet"; + link rel="alternate" type="application/atom+xml" href="/atom.xml"; + link rel="alternate" type="application/rss+xml" href="/rss.xml"; }) .with_body(template::main_page(html! { section .content_section {