Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions resources/renderReactPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function renderReactPage(options) {
var html = React.renderToStaticMarkup(React.createElement(component, props));

if (html.indexOf('<feed') !== -1) {
// react remove namespace so we re-add manually
html = html.replace('<feed>', '<feed xmlns="http://www.w3.org/2005/Atom">');

return '<?xml version="1.0" encoding="utf-8"?>' + html;
}

Expand Down
6 changes: 4 additions & 2 deletions site/blog/rss.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ var BlogRss = React.createClass({
.filter(file => !file.draft && path.extname(file.relPath) === '.md')
.sort((a, b) => a.date < b.date);
return (
<feed xmlns="http://www.w3.org/2005/Atom">
<feed>
<title>Blog | GraphQL</title>
<link href="http://graphql.org/blog/"/>
<id>http://graphql.org/blog/</id>
<updated>{new Date(posts[0].date).toISOString()}</updated>

{posts.map(post =>
<entry>
<title>{post.title}</title>
<link href={'http://graphql.org' + post.url}/>
<id>{post.permalink}</id>
<id>http://graphql.org{post.url}</id>
<updated>{new Date(post.date).toISOString()}</updated>
<summary>{post.title}</summary>
<content>{post.title}</content>
Expand Down