Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
gridsome-plugin-rss
Advanced tools
Readme
Generate an RSS feed from your Gridsome data store
yarn add gridsome-plugin-rss
npm install gridsome-plugin-rss
module.exports = {
plugins: [
{
use: 'gridsome-plugin-rss',
options: {
contentTypeName: 'BlogPost',
feedOptions: {
title: 'My Awesome Blog',
feed_url: 'https://superblog.com/rss.xml',
site_url: 'https://superblog.com'
},
feedItemOptions: node => ({
title: node.title,
description: node.description,
url: 'https://superblog.com/post/' + node.slug,
author: node.fields.author
}),
output: {
dir: './dist',
name: 'rss.xml'
}
}
}
]
}
string
requiredThe typeName
of the contentType
you wish to generate your RSS file for.
const products = store.addContentType({
typeName: 'BlogPost', // <-- add this to contentTypename
route: '/blog/:slug',
})
boolean
optionalIf true
, sorts your RSS file with newest items at the top.
NOTE: In order to sort chronologically, all nodes passed to this plugin must have a valid date
property. date
must be a timestamp string or unix timestamp (integer). If all nodes do not have valid dates, RSS items will NOT be sorted. See JS Date Object Parameters on MDN for details.
string
optionalIf set, it will sort your items chonologically by the date field you set.
Function
optionalnode
boolean
If set, it will filter your items using the function.
// In the options for gridsome-plugin-rss
filterItems: node => node.status === 'published'
number
optionalLimits the amount of items included in your RSS feed.
NOTE: Should be used with latest
set to true
, otherwise newer items will be excluded.
object
requiredThe top level options for your RSS feed. See dylang/node-rss#feedoptions for all options
Function
requirednode
object
The item level options for your RSS feed.
For each option (see dylang/node-rss#itemoptions for all options), node
is the object that you passed into Collection.addNode
NOTE: Since Gridsome will convert any node
field into camelCase, make sure that any property you access on node
is also camelCased.
Example:
// In gridsome.server.js
BlogPost.addNode({
title: BlogPost.title,
description: BlogPost.description,
fields: {
AuthorName: BlogPost.AuthorName,
'url-slug': BlogPost['url-slug']
}
})
...
// In the options for gridsome-plugin-rss
feedItemOptions: node => ({
title: node.title,
description: node.description,
url: 'https://superblog.com/post/' + node.fields.urlSlug,
author: node.fields.authorName,
})
object
optionaldir
: ./dist
name
: rss.xml
Specify the output directory and filename of the generated RSS.
By default, it is your configured build output directory (the configured value for key outputDir
) or just ./dist
dir
- a relative path to desired output directory.
name
- the filename of your XML file. You can omit the extension if you want to.
Example:
output: {
dir: './dist/',
name: 'rss' // or rss.xml
}
FAQs
Generate an RSS feed from your Gridsome data store
We found that gridsome-plugin-rss demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.