-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace layouts and adapt generator and tests.
- Loading branch information
Showing
8 changed files
with
148 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
<title>{{ config.title | e }}</title> | ||
{% if config.subtitle %}<subtitle>{{ config.subtitle | e }}</subtitle>{% endif %} | ||
<link href="{{ feed_url | uriencode }}" rel="self"/> | ||
<link href="{{ url | uriencode }}"/> | ||
<updated>{{ posts.first().updated.toISOString() }}</updated> | ||
<id>{{ url }}</id> | ||
{% if config.author %} | ||
<author> | ||
<name>{{ config.author | e }}</name> | ||
{% if config.email %}<email>{{ config.email | e }}</email>{% endif %} | ||
</author> | ||
{% endif %} | ||
<generator uri="http://hexo.io/">Hexo</generator> | ||
{% for post in posts.toArray() %} | ||
<entry> | ||
<title>{{ post.title | e }}</title> | ||
<link href="{{ (url + post.path) | uriencode }}"/> | ||
<id>{{ url + post.path }}</id> | ||
<published>{{ post.date.toISOString() }}</published> | ||
<updated>{{ post.updated.toISOString() }}</updated> | ||
<content type="html">{{ post.content | e }}</content> | ||
<summary type="html"> | ||
{% if post.description %} | ||
{{ post.description | e }} | ||
{% elif post.excerpt %} | ||
{{ post.excerpt | e }} | ||
{% elif post.content %} | ||
{{ post.content.substring(0, 140) | e }} | ||
{% endif %} | ||
</summary> | ||
{% for category in post.categories.toArray() %} | ||
<category term="{{ category.name }}" scheme="{{ (url + category.path) | uriencode }}"/> | ||
{% endfor %} | ||
{% for tag in post.tags.toArray() %} | ||
<category term="{{ tag.name }}" scheme="{{ (url + tag.path) | uriencode }}"/> | ||
{% endfor %} | ||
</entry> | ||
{% endfor %} | ||
</feed> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,20 +23,20 @@ | |
"author": "Tommy Chen <[email protected]> (http://zespia.tw)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"ejs": "^1.0.0", | ||
"object-assign": "^3.0.0" | ||
"nunjucks": "^1.3.4", | ||
"object-assign": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.9.1", | ||
"chai": "^3.2.0", | ||
"cheerio": "^0.19.0", | ||
"coveralls": "^2.11.2", | ||
"gulp": "^3.8.9", | ||
"gulp-istanbul": "^0.5.0", | ||
"gulp-istanbul": "^0.10.0", | ||
"gulp-jshint": "^1.8.6", | ||
"gulp-load-plugins": "^0.8.0", | ||
"gulp-load-plugins": "^0.10.0", | ||
"gulp-mocha": "^2.0.0", | ||
"hexo": "^3.0.0", | ||
"jshint-stylish": "^1.0.0", | ||
"jshint-stylish": "^2.0.1", | ||
"mocha": "^2.0.1", | ||
"rimraf": "^2.2.8" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rss version="2.0" | ||
xmlns:atom="http://www.w3.org/2005/Atom" | ||
xmlns:content="http://purl.org/rss/1.0/modules/content/"> | ||
<channel> | ||
<title>{{ config.title | e }}</title> | ||
<link>{{ url | uriencode }}</link> | ||
<atom:link href="{{ feed_url | uriencode }}" rel="self" type="application/rss+xml"/> | ||
<description>{{ config.description | e }}</description> | ||
<pubDate>{{ posts.first().updated.toDate().toUTCString() }}</pubDate> | ||
<generator>http://hexo.io/</generator> | ||
{% for post in posts.toArray() %} | ||
<item> | ||
<title>{{ post.title | e }}</title> | ||
<link>{{ (url + post.path) | uriencode }}</link> | ||
<guid>{{ (url + post.path) | uriencode }}</guid> | ||
<pubDate>{{ post.date.toDate().toUTCString() }}</pubDate> | ||
<description> | ||
{% if post.description %} | ||
{{ post.description | e }} | ||
{% elif post.excerpt %} | ||
{{ post.excerpt | e }} | ||
{% elif post.content %} | ||
{{ post.content.substring(0, 140) | e }} | ||
{% endif %} | ||
</description> | ||
<content:encoded>{{ post.content | e }}</content:encoded> | ||
{% if post.comments %}<comments>{{ (url + post.path) | uriencode }}#disqus_thread</comments>{% endif %} | ||
</item> | ||
{% endfor %} | ||
</channel> | ||
</rss> |
Oops, something went wrong.