Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@nuxtjs/feed
Advanced tools
[![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/feed/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/feed) [![npm](https://img.shields.io/npm/dt/@nuxtjs/feed.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/feed) [
@nuxtjs/feed
dependency using yarn or npm to your project@nuxtjs/feed
to modules
section of nuxt.config.js
{
modules: [
// Simple usage
'@nuxtjs/feed',
],
feed: [
// Your feeds here
]
}
So.. how to get these feeds working now?
{
//...
feed: [
// A default feed configuration object
{
path: '/feed.xml', // The route to your feed.
async create (feed) {}, // The create function (see below)
cacheTime: 1000 * 60 * 15, // How long should the feed be cached
type: 'rss2' // Can be: rss2, atom1, json1
}
],
//...
}
Let's take a closer look on the create
function. This is the API that
actually modifies your upcoming feed.
A simple create function could look like this:
create = async feed => {
feed.options = {
title: 'My blog',
description: 'This is my personal feed!',
}
const posts = await axios.get('https://blog.lichter.io/posts/').data
posts.forEach(post => {
feed.addItem({
title: post.title,
id: post.url,
link: post.url,
description: post.description,
content: post.content
})
feed.addCategory('Nuxt.js')
feed.addContributor({
name: 'Alexander Lichter',
email: 'example@lichter.io',
link: 'https://lichter.io/'
})
}
Feed creation is based on the feed package.
Please use it as reference and further documentation for modifying the feed
object
that is passed to the create
function.
Using the create
function gives you unlimited possibilities to customize your feed!
yarn install
or npm install
npm run dev
Copyright (c) Alexander Lichter
FAQs
Feed module enables everyone to have RSS, Atom and Json.
The npm package @nuxtjs/feed receives a total of 3,576 weekly downloads. As such, @nuxtjs/feed popularity was classified as popular.
We found that @nuxtjs/feed 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.