Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
hexo-feed
is a plugin for Hexo static site generator that builds RSS, Atom and JSON Feed for your content.
$ npm install hexo-feed --save-dev
rss.xml
, atom.xml
, and feed.json
.To configure the plugin add feed
key to the Hexo config file. For example:
feed:
limit: 20
order_by: "-date"
tag_dir: "tag"
category_dir: "category"
rss:
enable: true
template: "themes/theme/layout/_alternate/rss.ejs"
output: "rss.xml"
atom:
enable: true
template: "themes/theme/layout/_alternate/atom.ejs"
output: "atom.xml"
jsonFeed:
enable: true
template: "themes/theme/layout/_alternate/json.ejs"
output: "feed.json"
Key | Required | Default value | Description |
---|---|---|---|
limit | false | 0 | Post count that will be presented in the feed. Use 0 to publish all posts to the feed. |
order_by | false | -date | Sorting order for the posts. |
tag_dir | false | tag | Directory name to publish all tag-related feeds. Set false to avoid generating feeds by tag. For more information see below. |
category_dir | false | category | Directory name to publish all category-related feeds. Set false to avoid generating feeds by category. For more information see below. |
rss.enable | false | true | Enable/disable RSS feed generating. |
rss.template | false | Path to custom template for the RSS feed. | |
rss.output | false | rss.xml | Output filename for RSS feed. |
atom.enable | false | true | Enable/disable ATOM feed generating. |
atom.template | false | Path to custom template for the ATOM feed. | |
atom.output | false | atom.xml | Output filename for ATOM feed. |
jsonFeed.enable | false | true | Enable/disable JSON feed generating. |
jsonFeed.template | false | Path to custom template for the JSON feed. | |
jsonFeed.output | false | feed.json | Output filename for JSON feed. |
It's strongly recommended to include links to your feeds into the head section of your website pages. So, once you installed the plugin add the following code into your layout.ejs
file:
<html>
<head>
<!-- ... -->
<link rel="alternate" type="application/rss+xml" title="<%= config.title %>" href="<%= full_url_for(`/rss.xml}`) %>" />
<link rel="alternate" type="application/atom+xml" title="<%= config.title %>" href="<%= full_url_for(`/atom.xml`) %>" />
<link rel="alternate" type="application/json" title="<%= config.title %>" href="<%= full_url_for(`/feed.json`) %>" />
</head>
<body>
<!-- ... -->
</body>
</html>
The plugin intentionally doesn't change the <head>
section content. It allows you to customize the tag in the way you want.
hexo-feed
supports generating separated feeds for every tag and category. It allows your users to subscribe to a particular tag or category instead of all posts on the website.
Generating feeds for tags and categories is enabled by default. If you want to disable it set tag_dir
and category_dir
parameter to false
.
Important notice.
hexo-generator-tag
andhexo-generator-category
packages should be installed in order to generate tag/category feeds.
If you want to customize the feed template, specify the template path in rss.template
, atom.template
or jsonFeed.template
parameter. You can use default templates from hexo-feed
as a reference:
FAQs
RSS, Atom and JSON Feed generator for Hexo static site generator
The npm package hexo-feed receives a total of 1,319 weekly downloads. As such, hexo-feed popularity was classified as popular.
We found that hexo-feed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.