-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(docs): adding an RSS Feed #11941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great, thanks for adding it!
Co-Authored-By: marcysutton <[email protected]>
Co-Authored-By: marcysutton <[email protected]>
The plugin should be fixed so "fields.slug" isn't required. You should be able to specify that directly. Lots of people will have the URL elsewhere. |
Just as an idea: What about i18n and RSS feeds? |
@LekoArts I love the idea! Since there isn't much on i18n currently, I think that addition could come later after this doc is merged. |
Ok, this PR is ready! I had to fix some permalinks in my own feed to get a full understanding of what was going on. In short, I have custom For the post, I kept the customization details simple based on your feedback and added an "ask us for help!" callout in case anyone gets stuck. Given Wordpress generates RSS automatically, we should make this as easy to figure out as possible. I'll file an issue to look into i18n for RSS. Thanks for the suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - one request to change the plugin structure/name!
docs/docs/adding-an-rss-feed.md
Outdated
|
||
To customize the default feed schema (a.k.a. structure) output by the plugin to work with your website's content, you can start with the following code: | ||
|
||
```json:title=gatsby.config.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is js!
Would generally recommend doing something like:
```js:title=gatsby-config.js
module.exports = {
plugins: [
// your code block
]
}
```
just so we can show it as real-world as possible!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
|
||
To see your feed in action, run `gatsby build && gatsby serve` and you can then inspect the content and URLs in your RSS file at `http://localhost:9000/rss.xml`. | ||
|
||
> NOTE: if your blog has custom permalinks, such as links with or without dates in them, you may need to [customize `gatsby-node.js`](https://github.com/gatsbyjs/gatsby-starter-blog/blob/master/gatsby-node.js#L57) to output the correct URLs in your RSS feed. [Get in touch with us](/contributing/how-to-contribute/) if you need any help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this pattern a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seriously, when I was learning to build websites I would have loved this. I felt bad always pestering my one friend who knew how everything worked...having a whole community available would have been amazing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! I'll let you do the honors of merging 🎉
title | ||
description | ||
siteUrl | ||
site_url: siteUrl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any explanation why this additional site_url
is needed?
Description
When I set up an RSS feed for my website, I found some critical information was missing from the
gatsby-plugin-feed
README. I also didn't see a doc for creating an RSS feed, so I added one. That's what this PR does, in addition to some title case updates todoc-links.yml
while I was in there.