mirror of
https://github.com/amehime/hexo-theme-shoka.git
synced 2026-04-05 10:42:51 +08:00
35 lines
1.6 KiB
Plaintext
35 lines
1.6 KiB
Plaintext
<?xml version="1.0"?>
|
|
<rss version="2.0">
|
|
<channel>
|
|
<title><%= config.title %></title>
|
|
<subtitle><%= config.subtitle %></subtitle>
|
|
<icon><%= full_url_for('/images/favicon.ico') %></icon>
|
|
<link><%= config.url %></link>
|
|
<author>
|
|
<name><%= config.author %></name>
|
|
</author>
|
|
<description><%= config.description %></description>
|
|
<language><%= config.language %></language>
|
|
<pubDate><%= moment(lastBuildDate).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></pubDate>
|
|
<lastBuildDate><%= moment(lastBuildDate).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></lastBuildDate>
|
|
<%_ for (item of (config.keywords ? config.keywords.split(',') : [])) { _%>
|
|
<category term="<%= item %>" />
|
|
<%_ } _%>
|
|
<%_ for (const post of posts) { _%>
|
|
<item>
|
|
<guid isPermalink="true"><%= post.permalink %></guid>
|
|
<title><%= post.title %></title>
|
|
<link><%= post.permalink %></link>
|
|
<%_ for (const { name, path } of (post.categories ? post.categories.toArray() : [])) { _%>
|
|
<category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
|
|
<%_ } _%>
|
|
<%_ for (const { name, path } of (post.tags ? post.tags.toArray() : [])) { _%>
|
|
<category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
|
|
<%_ } _%>
|
|
<pubDate><%= moment(post.date).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></pubDate>
|
|
<description><![CDATA[ <%= post.content %> ]]></description>
|
|
</item>
|
|
<%_ } _%>
|
|
</channel>
|
|
</rss>
|