Comments (8)
I just tried this plugin and I think I ran into this bug. My siteUrl
is "https://anti-pattern.com"
but the URL is mangled in two places (that I can see).
In the JSON feed the feed_url
is "https:/anti-pattern.com/feed.json/.json"
.
In the XML feed the image.url
is "https:/anti-pattern.com/image.png"
.
from gatsby-plugin-feed-generator.
@brandonweiss Any chance you could provide the config that is causing this?
from gatsby-plugin-feed-generator.
@markmichon Of course!
siteMetadata: {
author: "Brandon Weiss",
description: "description",
title: "Anti-pattern",
siteUrl: "https://anti-pattern.com",
},
plugins: [
{
resolve: "gatsby-plugin-feed-generator",
options: {
rss: true,
json: true,
siteQuery: `
{
site {
siteMetadata {
author
description
title
siteUrl
}
}
}
`,
feeds: [
{
name: "feed",
query: `
{
allMdx(sort: { fields: [frontmatter___date], order: DESC }) {
edges {
node {
html
fields {
slug
}
frontmatter {
date
title
description
}
}
}
}
}
`,
normalize: ({ query: { site, allMdx } }) => {
return allMdx.edges.map(({ node: post }) => {
return {
date: post.frontmatter.date,
html: post.html,
title: post.frontmatter.title,
url: site.siteMetadata.siteUrl + post.fields.slug,
}
})
},
},
],
},
},
],
I didn’t think to include it because it seemed like a standard/default config, but maybe there’s something unusual I’m doing.
from gatsby-plugin-feed-generator.
@brandonweiss Thanks! Yeah nothing looks out of the ordinary there.
Should be resolved now. Let me know if you run into any issues. I couldn't duplicate it, but I suspect it had to do with trailing slashes. 2.0.1
handles that issue.
from gatsby-plugin-feed-generator.
@markmichon Thanks! The backslash issue seems to be fixed, although the extension on feed_url
still seems to be doubled. It’s showing as "https://anti-pattern.com/feed.json.json"
.
from gatsby-plugin-feed-generator.
Ah yeah, the extension is being added in two places.
gatsby-plugin-feed-generator/src/utils.js
Lines 16 to 17 in e60973b
I’d normally open a PR but I’m not sure exactly where you’d prefer to do the appending.
from gatsby-plugin-feed-generator.
Alright. Latest release on npm has it taken care of. Thanks for keeping things in check 👍
from gatsby-plugin-feed-generator.
Thanks for fixing it so quickly! ❤️
from gatsby-plugin-feed-generator.
Related Issues (14)
- Implement ssr to add links to head
- Relative links should be converted to absolute
- Write tests
- Add support for path prefix
- `RangeError: Invalid time value` on build HOT 7
- Missing feeds HOT 4
- Enhance plugin options and remove hardcoded values
- Combine multiple queries into one feed? HOT 3
- Feed is being pushed in header, Somehow my feeds urls are pre added in header.
- Is possible to add enclosure to the feed? HOT 2
- Implement methods for non-markdown based feeds HOT 2
- Issues with react-helmet HOT 2
- Gatsby v2/regeneratorRuntime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-feed-generator.