aboutsummaryrefslogtreecommitdiff
path: root/templates/blog_atom.rs.xml
blob: 73c78a07d04b64c33c922a17c8ad6f3fd505c2c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@use crate::post::Post;
@use chrono::Utc;

@(posts: Vec<Post>)

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://christine.website/blog.atom</id>
  <title>Xe's Blog</title>
  <updated>@Utc::now().to_rfc3339()</updated>
  <author>
    <name>Xe Iaso</name>
    <email>me@@christine.website</email>
  </author>
  <link href="https://christine.website/blog.atom" rel="self"/>
  <link href="https://christine.website/blog" rel="alternate"/>
  <generator uri="@env!("CARGO_PKG_REPOSITORY")" version="@env!("CARGO_PKG_VERSION")">@env!("CARGO_PKG_NAME")</generator>
  @for post in posts {
    <entry>
      <id>https://christine.website/@post.link</id>
      <title>@post.front_matter.title</title>
      <published>@post.date.to_rfc3339()</published>
      <link href="https://christine.website/@post.link" rel="alternate"/>
    </entry>
  }
</feed>