Generate Atom, RSS2, or JSON feed for your Saber app
npm install @alterjs/saber-plugin-feedGenerate feed in Atom 1.0 or RSS 2.0 or JSON format.
``bash`
yarn add @alterjs/saber-plugin-feed
In your saber-config.yml:
`yml`
plugins:
- resolve: '@alterjs/saber-plugin-feed'
options:
# Generate atom.xml
atomFeed: true
# Generate rss2.xml
rss2Feed: true
# Generate feed.json
jsonFeed: true
This plugin will also inject feed links as Vue computed property:
`js
// Recommended feed, atom > rss2 > json
this.$feed
// { permalink: string, type: 'atom' | 'rss2' | 'json' }
this.$allFeeds
// { rss2?: string, json?: string, atom?: string }
`
In your saber-config.yml:
`yml`
siteConfig:
author: Your Name # Optional
url: https://example.com # Required
email: you@email.com # Optional
- Type: string booleanundefined
- Default:
The output path of the Atom feed, when true it outputs to atom.xml.
- Type: string booleanundefined
- Default:
The output path of the RSS2 feed, when true it outputs to rss2.xml.
- Type: string booleanundefined
- Default:
The output path of the JSON feed, when true it outputs to feed.json.
- Type: number30
- Default:
The maximum amount of posts to include in the feed.
- Type: stringAll rights reserved`
- Default:
The copyright info in the feed.
MIT.