Skip to content

Add RSS feed for blog posts #40

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

Merged
merged 1 commit into from
Aug 23, 2016
Merged

Add RSS feed for blog posts #40

merged 1 commit into from
Aug 23, 2016

Conversation

j0k3r
Copy link
Contributor

@j0k3r j0k3r commented Aug 23, 2016

I needed React >= 0.14.0 to avoid self-closing tag (see facebook/react#2842) in RSS (mostly for the <link /> node).
Feel free to jump to any most up to date version below the 0.14.

I've also hacked around to be able to generate a xml file instead of html.

Content is not included in the RSS because I cannot find a way to sanitize the html. So the RSS wasn't valid. Most problem came from url with parameter in the html (like youtube link with a &).

Here is the RSS generated:

<?xml version="1.0" encoding="UTF-8"?>
<feed>
   <title>Blog | GraphQL</title>
   <link href="http://graphql.org/blog/" />
   <entry>
      <title>Wrapping a REST API in GraphQL</title>
      <link href="http://graphql.org/blog/rest-api-graphql-wrapper/" />
      <id>/blog/rest-api-graphql-wrapper/</id>
      <updated>2016-05-04T22:00:00.000Z</updated>
      <summary>Wrapping a REST API in GraphQL</summary>
      <content>Wrapping a REST API in GraphQL</content>
      <author>
         <name>Steven Luscher</name>
      </author>
   </entry>
   <entry>
      <title>Mocking your server is easy with GraphQL</title>
      <link href="http://graphql.org/blog/mocking-with-graphql/" />
      <id>/blog/mocking-with-graphql/</id>
      <updated>2016-04-18T22:00:00.000Z</updated>
      <summary>Mocking your server is easy with GraphQL</summary>
      <content>Mocking your server is easy with GraphQL</content>
      <author>
         <name>Jonas Helfer</name>
      </author>
   </entry>
   <entry>
      <title>Subscriptions in GraphQL and Relay</title>
      <link href="http://graphql.org/blog/subscriptions-in-graphql-and-relay/" />
      <id>/blog/subscriptions-in-graphql-and-relay/</id>
      <updated>2015-10-15T22:00:00.000Z</updated>
      <summary>Subscriptions in GraphQL and Relay</summary>
      <content>Subscriptions in GraphQL and Relay</content>
      <author>
         <name>Dan Schafer and Laney Kuenzel</name>
      </author>
   </entry>
   <entry>
      <title>GraphQL: A data query language</title>
      <link href="http://graphql.org/blog/graphql-a-query-language/" />
      <id>/blog/graphql-a-query-language/</id>
      <updated>2015-09-13T22:00:00.000Z</updated>
      <summary>GraphQL: A data query language</summary>
      <content>GraphQL: A data query language</content>
      <author>
         <name>Lee Byron</name>
      </author>
   </entry>
</feed>

It should fix #9

I needed React >= 0.14.0 to avoid self-closing tag in RSS (mostly for the `<link />` node).
Feel free to jump to any most up to date version.

I've also hacked around to be able to generate a xml file instead of html.
@ghost
Copy link

ghost commented Aug 23, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@ghost ghost added the CLA Signed label Aug 23, 2016
@leebyron leebyron merged commit f45579d into graphql:source Aug 23, 2016
@leebyron
Copy link
Collaborator

!!! This is so good!

leebyron added a commit that referenced this pull request Aug 23, 2016
@j0k3r
Copy link
Contributor Author

j0k3r commented Aug 23, 2016

@leebyron thanks :)

@j0k3r j0k3r deleted the rss branch August 23, 2016 19:22
@j0k3r j0k3r mentioned this pull request Aug 23, 2016
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.

Blog RSS / Atom feed?
2 participants