-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
My blog turns out to be quite large. It was recently brought to my attention that the RSS feed wasn't working well for readers as a consequence.
At present, Docusaurus includes all blog entries in the Atom / RSS feeds: https://docusaurus.io/docs/blog#feed
The proposal is to add another option to support filtering the responses in the feed. This would allow people to reduce the size of their blogs when they become large.
Has this been requested on Canny?
No
Motivation
see description.
API design
Consider the below type with a new filter option:
type FeedType = 'rss' | 'atom' | 'json';
type BlogOptions = {
feedOptions?: {
type?: FeedType | 'all' | FeedType[] | null;
title?: string;
description?: string;
copyright: string;
language?: string; // possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
filter?: (blogItem: BlogItem, index: number) => boolean; // **NEW OPTION**
};
};This could then be used like this:
module.exports = {
// ...
presets: [
[
'@docusaurus/preset-classic',
{
blog: {
feedOptions: {
type: 'all',
filter: (blogItem, index) => index < 20, // only include first 20 entries
},
},
},
],
],
};
Have you tried building it?
No - but I would. I've built a workaround in my blog: johnnyreilly/blog.johnnyreilly.com#352
Yes: see #8378
Self-service
- I'd be willing to contribute this feature to Docusaurus myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.