New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nuxt-feed

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-feed

`nuxt-feed` is a layer that is added on top of Nuxt 3 to generate a `feed.xml` file for your content.

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Nuxt Feed Generator

nuxt-feed is a layer that is added on top of Nuxt 3 to generate a feed.xml file for your content.

Installation

Make sure to install the npm package using npm or yarn

yarn add nuxt-feed

Then add the dependency to your extends in nuxt.config:

defineNuxtConfig({
  extends: [
    'nuxt-feed'
  ]
})

Now, its time to provide the required configuration for the feed under the runtimeConfig key in nuxt.config:

defineNuxtConfig({
  extends: [
    'nuxt-feed'
  ],
  runtimeConfig: {
    public: {
      feed: {
        id: 'rss', // optional, default: 'rss'
        title: 'Your site title',
        siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'https://site.com',
        description: 'welcome to my cool site',
        image: '' // optional,
        favicon '' // optional,
        language: 'ar-EG', // prefer more explicit language codes like `en-AU` over `en`
        author: { // optional
          name: 'Islam Shehata',
          email: 'myemail@company.com'
        },
        where: {} // where object for the serverQueryContent() method. default { published: true }
        sort: {} // sort object for the serverQueryContent() method. default: { date: -1 }
        pathStartsWith: null // optional filter to filter out docs by path before generating the feed, e.g: '/blog'
      }
    }
  }
})

you are done! you should be able to access your feed at http://localhost:3000/feed.xml

in production build, this will be prerendered.

FAQs

Package last updated on 03 Feb 2023

Did you know?

Socket

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.

Install

Related posts