use new rss endpoint: blog.rss
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2024-06-02 19:35:44 +02:00
parent de60dd23e6
commit b9194dd0fa
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,7 @@ use ::rss::{
extension::atom::{AtomExtension, Link}, extension::atom::{AtomExtension, Link},
Category, Channel, Guid, Image, Item, Category, Channel, Guid, Image, Item,
}; };
use actix_web::{get, http::header::ContentType, web, HttpResponse, Responder}; use actix_web::{get, http::header::ContentType, routes, web, HttpResponse, Responder};
use cached::proc_macro::once; use cached::proc_macro::once;
use chrono::{DateTime, Datelike, Local, NaiveDateTime, Utc}; use chrono::{DateTime, Datelike, Local, NaiveDateTime, Utc};
use chrono_tz::Europe; use chrono_tz::Europe;
@ -278,6 +278,8 @@ fn get_post(
) )
} }
#[routes]
#[get("/blog/blog.rss")]
#[get("/blog/rss")] #[get("/blog/rss")]
async fn rss(config: web::Data<Config>) -> impl Responder { async fn rss(config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()

View file

@ -17,7 +17,7 @@
<h1>Blog</h1> <h1>Blog</h1>
{{#about}} {{&content}} {{/about}} {{#about}} {{&content}} {{/about}}
<a id="rss" href="/blog/rss">Lien vers le flux RSS</a> <a id="rss" href="/blog/blog.rss">Lien vers le flux RSS</a>
{{#no_posts}} {{#no_posts}}
<h2>Aucun posts</h2> <h2>Aucun posts</h2>