-
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
Added the ability to customize the feed's title #2573
Added the ability to customize the feed's title #2573
Conversation
Deploy preview ready! Built with commit 5f5af45 |
There's a lint error — https://travis-ci.org/gatsbyjs/gatsby/jobs/291842209 Could you run |
Done. Sorry about that, I'm used to my projects with auto-format on commit (prettier + husky + lint-staged), and I totally forgot to run format |
Thanks! |
Deploy preview failed. Built with commit 5f5af45 https://app.netlify.com/sites/using-glamor/deploys/59f0e918df99537566a3b9a2 |
@@ -76,7 +76,8 @@ plugins: [ | |||
} | |||
} | |||
`, | |||
output: '/rss.xml' | |||
output: '/rss.xml', | |||
feedTitle: 'My feed title' |
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 should be title
. feedTitle
is redundant.
@@ -17,6 +17,7 @@ exports.onRenderBody = ({ setHeadComponents }, pluginOptions) => { | |||
key={`gatsby-plugin-feed-${i}`} | |||
rel="alternate" | |||
type="application/rss+xml" | |||
title={feedTitle} |
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.
Again, title
. I'll be changing this to match convention.
After further research, I'm not sure this is even valid HTML5 syntax. The validator passes, but the Nor is I'll revert this until we can come to a better understanding, because while this validates, I'm not sure browsers will parse and respond to it properly, and in a manner the user expects. Sorry if this comes across forcefully. RSS is a standard I'm quite familiar with. Since I'm publishing multiple feeds (with differing content) myself (and I don't think I'm alone), it's important to adhere to best practices, by default, in the plugin. |
My reason for this PR was that https://tt-rss.org/ use the title for showing the list of feeds when parsing a website with multiple feeds. Without this, I was left with a choice between "application/rss+xml" and "application/rss+xml". Since many site I daily visit use the "title" attribute, I thought it was the common way to do this. |
* upstream/master: (156 commits) Publish new version Publish use peer reps (gatsbyjs#2832) escape pipe in markdown (gatsbyjs#2835) Publish Small, perhaps nitpicky, change but not explicitly stating which file this config was referencing tripped up the flow for me for a bit when running through step-by-step. (gatsbyjs#2834) Fix no trailing slashes (gatsbyjs#2828) Publish Update to the latest Prettier Small fixes to tutorial part one (gatsbyjs#2821) Revert "Fix: only the first feed was getting options.query injected. Now all the feeds have it injected. (gatsbyjs#2571)" (gatsbyjs#2820) Revert "Added the ability to customize the feed's title (gatsbyjs#2573)" (gatsbyjs#2822) keep track of root node id with weakmap instead of storing root node id as additional field in sub nodes (gatsbyjs#2812) Publish Add onLoad prop to gatsby-image (gatsbyjs#2818) Add post "Migrate from Hugo to Gatsby" (gatsbyjs#2808) Update readme showcase so that source links are distinct (gatsbyjs#2815) Publish Add Softin Sistemas' website into Showcase (gatsbyjs#2793) Validate that gatsby-source-filesystem paths exist fixes gatsbyjs#2806 (gatsbyjs#2813) ...
No description provided.