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

fix rss #454

Merged
merged 1 commit into from
Feb 17, 2021
Merged
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
11 changes: 8 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ module.exports = {
{
// eslint-disable-next-line max-len
serialize: ({ query: { site, allMarkdownRemark } }) => allMarkdownRemark.edges.map((edge) => ({
...edge.node.frontmatter,
// ...edge.node.frontmatter,
description: edge.node.excerpt.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g, '').replace(/\s+/g, '').replace(/#x.*;/, '').replace(/&/, ''),
date: edge.node.frontmatter.date,
url: `${site.siteMetadata.siteUrl}/${edge.node.fields.slug}`,
guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
guid: `${site.siteMetadata.siteUrl}/${edge.node.fields.slug}`,
custom_elements: [{ "content:encoded": edge.node.html }],
// custom_elements: [{
// 'content:encoded': edge.node.html.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g, '').replace(/\s+/g, '').replace(/#x.*;/, '').replace(/&/, '')
// .substr(0, 150),
Expand Down Expand Up @@ -134,7 +135,11 @@ module.exports = {
}
`,
output: '/rss.xml',
title: 'tubone\'s Boyaki',
title: 'tubone BOYAKI',
feed_url: "https://blog.tubone-project24.xyz/rss.xml",
site_url: "https://blog.tubone-project24.xyz",
docs: "http://github.com/dylang/node-rss",
link: "https://feeds.feedburner.com/tubone-boyaki",
},
],
},
Expand Down