advertise rss

This commit is contained in:
slonkazoid 2024-05-26 20:23:40 +03:00
parent c1e1670db3
commit 516e791ad6
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM
2 changed files with 5 additions and 0 deletions

View file

@ -56,6 +56,7 @@ struct IndexTemplate {
title: String,
description: String,
posts: Vec<PostMetadata>,
rss: bool,
}
#[derive(Template)]
@ -87,6 +88,7 @@ async fn index(
title: state.config.title.clone(),
description: state.config.description.clone(),
posts,
rss: state.config.rss.enable,
})
}

View file

@ -9,6 +9,9 @@
<meta property="og:description" content="{{ description }}" />
<title>{{ title }}</title>
<link rel="stylesheet" href="/static/style.css" />
{% if rss %}
<link rel="alternate" type="application/rss+xml" title="{{ title }}" href="/feed.xml" />
{% endif %}
</head>
<body>
<main>