This repository has been archived by the owner on May 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
atom.ejs
38 lines (38 loc) · 1.72 KB
/
atom.ejs
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
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><%= webpackConfig.blog.title %></title>
<subtitle><%= webpackConfig.blog.subTitle %></subtitle>
<link href="/atom.xml" rel="self"/>
<link href="<%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host %>"/>
<updated><%= new Date().toISOString() %></updated>
<id><%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host %></id>
<author>
<name>Liu Yuyang</name>
<email>[email protected]</email>
</author>
<generator uri="<%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host %>">blog-next</generator>
<% compilation.feed.forEach(function(post){ %>
<entry>
<title><%= post.title %></title>
<link href="<%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host + post.path %>"/>
<id><%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host + post.path %></id>
<published><%= post.date.toISOString() %></published>
<updated><%= post.updated.toISOString() %></updated>
<summary type="html">
<% if (post.description) { %>
<%= post.description %>
<% } else if (post.excerpt) { %>
<%= post.excerpt %>
<% } else if (post.content) { %>
<%= post.content %>
<% } else { %>
No summary
<% } %>
</summary>
<category term="<%= post.category %>" scheme="<%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host + '/categories?category=' + post.category %>"/>
<% post.tags.forEach(function (tag) { %>
<category term="<%= tag %>" scheme="<%= webpackConfig.blog.scheme + '://' + webpackConfig.blog.host + '/tags?tag=' + tag %>"/>
<% }) %>
</entry>
<% }) %>
</feed>