1.0.3 • Published 4 years ago

@lmack/sanity-heroku-preview v1.0.3

Weekly downloads
5
License
MIT
Repository
-
Last release
4 years ago

@lmack/sanity-heroku-preview

  • Quickly create & configure a Heroku app that will provide a live preview for your Sanity site
  • Creates a _redirects file in the 'static' folder
  • Creates a Procfile that instructs Heroku on how to run the app
  • Optionally creates a netlify.toml with your SANITY_TOKEN

Options

KeyTypeDefault ValueDetails
herokuAppNameStringCan't contain spaces or capital letters If ommitted, terminal will prompt user for a name
previewSlugString'preview'Used to redirect to the Heroku app
sanityTokenStringprocess.env.SANITY_TOKENRequired if SANITY_TOKEN is not defined in .env file
datasetToUseStringprocess.env.DATASETRequired if DATASET is not defined in .env file
projectIDStringprocess.env.PROJECT_IDRequired if PROJECT_ID is not defined in .env file
createNetlifyConfigStringfalseIf true, a netlify.toml will be created with your Dataset, Project ID and Sanity Token set as environment variables

Important Notes

  • After this plugins runs, be sure to commit. Then, run git push heroku master to deploy.
  • A Procfile is created when you first start your site after configuring this theme in your plugins. To prevent the creation of a new Heroku app every time you start your site, make sure you do NOT delete the Procfile.

NEED TO DO:

  • add env vars to root netlify.toml if 'site' and 'studio' are in the same repo (otherwise netlify build won't work)
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago