hexo-generator-feed
Advanced tools
Comparing version 0.0.3 to 0.0.4
23
index.js
@@ -26,2 +26,3 @@ var util = hexo.util, | ||
{updated: new Date().toISOString()}, | ||
{id: config.url + '/'}, | ||
{author: | ||
@@ -41,3 +42,3 @@ { | ||
if (config.email) content[4].author.email = '<![CDATA[' + config.email + ']]>'; | ||
if (config.email) content[5].author.email = '<![CDATA[' + config.email + ']]>'; | ||
if (config.subtitle) content.splice(1, 0, {subtitle: '<![CDATA[' + config.subtitle + ']]>'}); | ||
@@ -60,3 +61,5 @@ | ||
}, | ||
{updated: item.date.toDate().toISOString()}, | ||
{id: config.url + '/' + item.permalink}, | ||
{published: item.date.toDate().toISOString()}, | ||
{updated: item.updated.toDate().toISOString()}, | ||
{ | ||
@@ -71,2 +74,18 @@ _name: 'content', | ||
if (item.tags){ | ||
var tags = []; | ||
item.tags.forEach(function(tag){ | ||
tags.push({ | ||
_name: 'category', | ||
_attrs: { | ||
scheme: config.url + '/' + encodeURIComponent(tag.permalink), | ||
term: tag.name | ||
} | ||
}); | ||
}); | ||
entry = [].concat(entry, tags); | ||
} | ||
content.push({entry: entry}); | ||
@@ -73,0 +92,0 @@ }); |
{ | ||
"name": "hexo-generator-feed", | ||
"version": "0.0.3", | ||
"description": "Node.js Blogging framework. Inspired by Jekyll & Octopress.", | ||
"version": "0.0.4", | ||
"description": "Feed generator plugin for Hexo", | ||
"main": "index", | ||
@@ -10,8 +10,4 @@ "repository": { | ||
}, | ||
"keywords": ["website", "blog", "cms", "hexo"], | ||
"author": { | ||
"name": "Tommy Chen", | ||
"email": "tommy351@gmail.com", | ||
"url": "http://zespia.tw" | ||
}, | ||
"keywords": ["website", "blog", "cms", "framework", "hexo"], | ||
"author": "Tommy Chen <tommy351@gmail.com> (http://zespia.tw)", | ||
"license": { | ||
@@ -18,0 +14,0 @@ "type": "MIT", |
2740
88