Socket
Socket
Sign inDemoInstall

hexo-generator-feed

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-generator-feed - npm Package Compare versions

Comparing version 1.2.0 to 1.2.2

4

index.js

@@ -11,3 +11,5 @@ /* global hexo */

hub: '',
content: true
content: true,
content_limit: 140,
content_limit_delim: ''
}, hexo.config.feed);

@@ -14,0 +16,0 @@

@@ -7,2 +7,3 @@ 'use strict';

var fs = require('fs');
var gravatar = require('hexo/lib/plugins/helper/gravatar');

@@ -13,2 +14,6 @@ env.addFilter('uriencode', function(str) {

env.addFilter('noControlChars', function(str) {
return str.replace(/[\x00-\x1F\x7F]/g, '');
});
var atomTmplSrc = pathFn.join(__dirname, '../atom.xml');

@@ -25,2 +30,6 @@ var atomTmpl = nunjucks.compile(fs.readFileSync(atomTmplSrc, 'utf8'), env);

var posts = locals.posts.sort('-date');
posts = posts.filter(function(post) {
return post.draft !== true;
});
if (feedConfig.limit) posts = posts.limit(feedConfig.limit);

@@ -31,5 +40,9 @@

var icon;
if (config.email) icon = gravatar(config.email);
var xml = template.render({
config: config,
url: url,
icon: icon,
posts: posts,

@@ -36,0 +49,0 @@ feed_url: config.root + feedConfig.path

{
"name": "hexo-generator-feed",
"version": "1.2.0",
"version": "1.2.2",
"description": "Feed generator plugin for Hexo",

@@ -24,18 +24,22 @@ "main": "index",

"author": "Tommy Chen <tommy351@gmail.com> (http://zespia.tw)",
"maintainers": [
"Abner Chou <hi@abnerchou.me> (http://abnerchou.me)"
],
"license": "MIT",
"dependencies": {
"nunjucks": "^2.4.1",
"object-assign": "^4.0.1"
"nunjucks": "^3.0.0",
"object-assign": "^4.1.1"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"chai": "^3.5.0",
"cheerio": "^0.20.0",
"cheerio": "^0.22.0",
"eslint": "^2.4.0",
"eslint-config-hexo": "^1.0.3",
"hexo": "^3.0.0",
"jscs": "^2.11.0",
"eslint-config-hexo": "^1.0.4",
"hexo": "^3.3.1",
"istanbul": "^0.4.5",
"jscs": "^3.0.7",
"jscs-preset-hexo": "^1.0.1",
"mocha": "^2.4.5",
"istanbul": "^0.4.2"
"mocha": "^3.2.0"
}
}

@@ -16,2 +16,6 @@ # hexo-generator-feed

## Use
In the [front-matter](https://hexo.io/docs/front-matter.html) of your post, you can optionally add a `description` setting to write a summary for the post. Otherwise the summary will default to the excerpt or the first 140 characters of the post.
## Options

@@ -27,2 +31,5 @@

hub:
content:
content_limit: 140
content_limit_delim: ' '
```

@@ -34,1 +41,4 @@

- **hub** - URL of the PubSubHubbub hubs (Leave it empty if you don't use it)
- **content** - (optional) set to 'true' to include the contents of the entire post in the feed.
- **content_limit** - (optional) Default length of post content used in summary. Only used, if **content** setting is false and no custom post description present.
- **content_limit_delim** - (optional) If **content_limit** is used to shorten post contents, only cut at the last occurrence of this delimiter before reaching the character limit. Not used by default.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc