datocms / gatsby-source-datocms

Official GatsbyJS source plugin to pull content from DatoCMS
MIT License
140 stars 51 forks source link

How could I add Progressive Web Apps (PWAs) support? #132

Closed winstonma closed 3 years ago

winstonma commented 3 years ago

I would like add Progressive Web Apps (PWAs) support on my site. And it requires gatsby-plugin-offline which depends on gatsby-plugin-manifest. This is the template config in gatsby-config.js:

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `GatsbyJS`,
        short_name: `GatsbyJS`,
        start_url: `/`,
        background_color: `#f7f0eb`,
        theme_color: `#a2466c`,
        display: `standalone`,
      },
    },
  ],
}

As I stored every web site content inside DatoCMS, is it possible that the options inside gatsby-plugin-manifest is filled by content in DatoCMS (gatsby-source-datocms)?

Thank you very much

matjack1 commented 3 years ago

Hey @winstonma sorry for the late reply, but I don't think you can get information from Dato using our plugin at build time.

You would need to make a call to our API at that moment, but I'm not sure if Gatsby allows that, sorry!

winstonma commented 3 years ago

@matjack1 Thanks for the info.

In the future if I would update the codebase and DatoCMS respectively.