Sharesight user help pages. This is a public repository.
Built with Middleman, Contentful, and Lunr.js search.
- Setup
CONTENTFUL_*
environment keys as per below. - Have Node and Ruby versions installed (see package files).
$ bundle install
$ yarn install
$ yarn start
- Be able to run locally first.
- Run tests:
$ bundle exec rspec spec
- Set
APP_ENV
to eitherproduction
orstaging
with your target; defaults tostaging
. - Download from Contentful:
$ bundle exec middleman contentful
- Build Static HTML to deploy:
$ bundle exec middleman build --verbose
- Deploy with
$ bundle exec middleman s3_sync
- See Github Actions workflow for more details.
To run locally, something like .envrc
is suggested.
https://github.com/sharesight/help.sharesight.com/settings/secrets
- AWS_DEPLOY_ACCESS_ID - for deploying to AWS S3 on user help_deploy
- AWS_DEPLOY_SECRET_KEY - for deploying to AWS S3 on user help_deploy
- CONTENTFUL_MASTER_TOKEN - for pulling published content from Contentful
- CONTENTFUL_PREVIEW_TOKEN - for pulling draft content from Contentful
- SLACK_WEBHOOK_URL - for posting into Slack notifications/etc
Example local .envrc
file for development—using direnv (https://direnv.net/):
# .envrc
export CONTENTFUL_MASTER_TOKEN=DELIVERY_TOKEN_HERE
export CONTENTFUL_PREVIEW_TOKEN=PREVIEW_TOKEN_HERE