Git Product home page Git Product logo

Comments (7)

markmichon avatar markmichon commented on June 8, 2024

@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.

brentrobbins avatar brentrobbins commented on June 8, 2024

@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.

brentrobbins avatar brentrobbins commented on June 8, 2024

@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.

markmichon avatar markmichon commented on June 8, 2024

@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.

brentrobbins avatar brentrobbins commented on June 8, 2024

@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.

markmichon avatar markmichon commented on June 8, 2024

@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.

brentrobbins avatar brentrobbins commented on June 8, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.