Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-plugin-feed): add match plugin option #13827

Merged
merged 1 commit into from
May 21, 2019

Conversation

laysent
Copy link
Contributor

@laysent laysent commented May 3, 2019

Description

This PR is to propose a way to only include RSS feed in part of website, not all pages of it. gatsby-plugin-feed allows to customize the generated feed to only include part of the contents. However, the generated feed will be included in all pages by default, which might not be necessary in some cases.

It will be useful when for example blog is only part of the website, and there are many other pages which are not related to blog posts; or when there are different RSS feeds in website and each belongs to different part.

Adding an extra field match in feed array provides the ability to control where feed should be inserted when generating SSR result.

Related Issues

No issue related

@laysent laysent requested a review from a team May 3, 2019 04:32
@DSchau DSchau added the status: awaiting author response Additional information has been requested from the author label May 3, 2019
@laysent
Copy link
Contributor Author

laysent commented May 7, 2019

@DSchau Hi, I noticed that this PR is labeled as awaiting author response. May I know if there is anything I can do here?

@LekoArts LekoArts added status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response and removed status: awaiting author response Additional information has been requested from the author labels May 7, 2019
@LekoArts
Copy link
Contributor

LekoArts commented May 8, 2019

I think Dustin accidentally chose the wrong label so I think there's nothing needed from you at the moment. The team is out of office right now, so please have remind us of this PR next week. Thanks!

@wardpeet
Copy link
Contributor

wardpeet commented May 8, 2019

@laysent is there any reason why you chose a string and not directly went for a regex as an option?

@laysent
Copy link
Contributor Author

laysent commented May 8, 2019

@wardpeet I tried RegExp before, however it seems the RegExp option configured in gatsby-config.js cannot be passed to gatsby-plugin-feed. Looking at api-runner-ssr.js file generated under .cache folder, I found that RegExp provided in option has been transfered to {} there. Thus I then chose to use string instead, as it won't be transformed.

@laysent
Copy link
Contributor Author

laysent commented May 13, 2019

@LekoArts Hi, just to remind for this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants