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

Added the ability to customize the feed's title #2573

Merged
merged 3 commits into from
Oct 25, 2017
Merged

Added the ability to customize the feed's title #2573

merged 3 commits into from
Oct 25, 2017

Conversation

briced
Copy link
Contributor

@briced briced commented Oct 21, 2017

No description provided.

@gatsbybot
Copy link
Collaborator

gatsbybot commented Oct 21, 2017

Deploy preview ready!

Built with commit 5f5af45

https://deploy-preview-2573--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

There's a lint error — https://travis-ci.org/gatsbyjs/gatsby/jobs/291842209

Could you run npm run format from the base of the repo? That should fix the lint error.

@briced
Copy link
Contributor Author

briced commented Oct 24, 2017

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

@KyleAMathews KyleAMathews merged commit aae508f into gatsbyjs:master Oct 25, 2017
@KyleAMathews
Copy link
Contributor

Thanks!

@KyleAMathews
Copy link
Contributor

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'

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}

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.

@secretfader
Copy link

secretfader commented Nov 7, 2017

After further research, I'm not sure this is even valid HTML5 syntax. The validator passes, but the title attribute seems to be used primarily to reference alternate stylesheets, which the feed isn't. (I'd argue that the feed is persistent, and thus, the relevant title is embedded into the RSS document.)

Nor is title specified in the best practices guide published by the RSS Advisory Board.

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.

@secretfader secretfader mentioned this pull request Nov 7, 2017
@briced
Copy link
Contributor Author

briced commented Nov 7, 2017

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.

KyleAMathews pushed a commit that referenced this pull request Nov 7, 2017
singuerinc added a commit to singuerinc/gatsby that referenced this pull request Nov 7, 2017
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants