Comments (7)
@holmberd Currently it is set up to require that you pass in a date for each item in the feed. Do you have a use case where this is a problem?
from gatsby-plugin-feed-generator.
@markmichon I ran into this too. I am using this feed to power a 'dynamic' react app in the Gatsby site that can not be generated statically. Essentially it's a view that needs to be searchable & filterable. Probably not the use case for this plugin, but it works.
Anyways, would it be possible to remove the date requirement? To get around it for now I just added the date back and added a Date.now()
timestamp so there's something there and it build fine. I am just ignoring it in my app.
By the way, thanks for the plugin! I really appreciate it.
from gatsby-plugin-feed-generator.
@markmichon Actually I don't think this plugin's intension was to generate any content, but content like blog posts. I noticed in your plugin it's hardcoded to only display the title, link, description, content, id and date. I was hoping any fields/content is queried and pulled into the feed will be displayed, but doesn't look that's a possibility.
from gatsby-plugin-feed-generator.
@brentrobbins Ah okay. It's not documented, but technically you can pass more options in https://github.com/markmichon/gatsby-plugin-feed-generator/blob/master/src/utils.js#L22
As long as they map nicely to anything used by the feed library they should work.
Happy to accept a PR if you want to make all those defaults fallback to nothing.
But to your first point, yeah this runs at build time, so anything that happens live isn't going to show up.
from gatsby-plugin-feed-generator.
@markmichon So would this work to display anything for the items? Here's what I am trying to display:
normalize: ({ query: { site, allMarkdownRemark } }) => {
return allMarkdownRemark.edges.map(edge => {
return {
title: edge.node.frontmatter.title,
url: site.siteMetadata.siteUrl + edge.node.fields.slug,
last_name: edge.node.frontmatter.last_name,
job_title: edge.node.frontmatter.job_title,
credentials: edge.node.frontmatter.credentials,
bio: edge.node.frontmatter.bio,
procedures_performed: edge.node.frontmatter.procedures_performed,
address: edge.node.frontmatter.address,
city: edge.node.frontmatter.city,
state: edge.node.frontmatter.state,
zipcode: edge.node.frontmatter.zipcode,
website: edge.node.frontmatter.website,
date: Date.now()
}
})
},
from gatsby-plugin-feed-generator.
@brentrobbins I'm not sure the feed dependency we're using supports custom categories in rss.
If you're mostly just looking for XML(or JSON for that matter) as your output type, it might be better to roll your own plugin so you don't have to fight with the RSS spec or JSON feed spec.
from gatsby-plugin-feed-generator.
@markmichon right I am looking for a more custom JSON output. Thanks for your help though. I appreciate it.
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
- 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
- `path.join` mangles schema-delimiting double-slash HOT 8
- 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.