Feed Support
The theme adds feed support with @vuepress/plugin-feed. To use it, install @vuepress/plugin-feed manually in your project.
Info
vuepress-theme-hope provides plugins.feed in theme options to @vuepress/plugin-feed.
Enable Feed Output
The @vuepress/plugin-feed plugin can generate feed files in the following three formats for you:
- Atom 1.0
- JSON 1.1
- RSS 2.0
Tips
Please use RSS if possible. Atom and JSON are provided for compatibility.
Please set plugins.feed.atom, plugins.feed.json or plugins.feed.rss to true in theme options according to the format you want to generate.
Tips
Of course, you can enable them all. This is not a "choose 1 from 3" situation.
Considering that few people use feeds now, this plugin generates detailed feed files with minimal configuration. It also allows you to freely define the output content of the feed.
Channel Settings
You can customize the feed channel information by setting the plugins.feed.channel in theme options.
We recommend the following settings:
- Convert the date of creating the feed to ISOString and write it into
channel.pubDate - The update period of the content set in
channel.ttl(unit: minutes) - Set copyright information via
channel.copyright, or fallback tocopyrightin theme options - Set the channel author via
channel.author, or fallback toauthorin theme options
Default channel settings
The title and description of the channel are the name and description of the site by default
The link of the channel and the last update time will be automatically generated by the plugin.
For detailed options and their default values, see Feed Channel Docs.
Generation Control
By default, all articles are added to the feed stream.
You can control how feed items are generated for specific articles by configuring the feed option in frontmatter, check Feed frontmatter Docs for details.
You can take full control of feed item generation by configuring the plugins.feed.getter, check Feed Getter Docs for details.
I18n Config
The plugin generates separate feeds for each language.
You can provide different settings for different languages via plugins.feed.locales.
Changelog
2a19e-onbdfcb-on0fe94-on70aae-on32f93-on2f38e-on2a306-onc8d60-on2243a-onfd395-on60053-on119ca-onf6ff0-on37324-on3c199-on