Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-plugin-posify

Gatsby post-build plugin that creates platformOS release files.

Installation

npm install @platformos/gatsby-plugin-posify

Usage

gatsby-config.js

module.exports = {
  assetPrefix: 'https://uploads.staging.oregon.platform-os.com/instances/<YOUR_INSTANCE_ID>/assets',

  plugins: [
    '@platformos/gatsby-plugin-posify'
  ]
}

The plugin will create the files in the .posify folder in your project root. You can then copy or move the contents of the .posify folder to your pOS project root in a postbuild npm script:

package.json

"scripts": {
  "postbuild": "cp -R .posify/* ../pos" // where `../pos` is the relative path of your pOS project root
}, 

Dependencies

This plugin uses gatsby-plugin-content-hash to add a hash to page-data json files.

© 2024 Gatsby, Inc.