mirror of
https://codeberg.org/mayx/pages
synced 2026-02-15 23:34:51 +08:00
update
This commit is contained in:
36
rss.xml
Normal file
36
rss.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
---
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xml" href="/feed.xslt.xml"?>
|
||||
<?xml-stylesheet type="text/css" href="/assets/css/feed.css"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ site.title | xml_escape }}</title>
|
||||
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
|
||||
<link>{{ "/" | absolute_url }}</link>
|
||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
||||
<language>{{ site.lang | default: "zh-CN" }}</language>
|
||||
<atom:link href="{{ "/rss.xml" | absolute_url }}" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="{{ site.feed.path | absolute_url }}" rel="alternate" type="application/atom+xml" />
|
||||
{% for post in site.posts limit:10 %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
{% assign ai_cache = site.data.ai-cache[post.url] %}
|
||||
{% if ai_cache %}
|
||||
<description>{{ ai_cache | xml_escape }}</description>
|
||||
{% elsif post.excerpt %}
|
||||
<description>{{ post.excerpt | strip_html | xml_escape }}</description>
|
||||
{% else %}
|
||||
<description>{{ post.content | xml_escape }}</description>
|
||||
{% endif %}
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ post.url | absolute_url }}</link>
|
||||
{% for tag in post.tags %}
|
||||
<category>{{ tag | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
<guid>{{ post.url | absolute_url }}</guid>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user