Skip to content

wKovacs64/drinks

Repository files navigation

Drinks 🥃

Craft Cocktail Gallery


Technologies used:

Run your own:

  1. Create a new app and index at Algolia.

  2. Create a new space, content management token, and content delivery (access) token at Contentful.

  3. Clone this repo and change to the directory.

    • You'll probably want to edit the name, description, etc.
  4. Use the contentful-cli package to run the following:

    contentful space import --management-token <your-management-token> --space-id <your-space-id> --content-file contentful-space.json
  5. Copy the provided .env.example file to a new .env file and fill in the values with your information.

  6. Deploy to Fly:

  7. Create a couple webhooks in Contentful (one for dev and one for prod):

    • Trigger off Entry Publish and Unpublish events
    • POST requests to <your-domain>/_/content-change (domain should differ for dev and prod)
    • Set custom X-Contentful-Webhook-Token header to a private, generated token of your choosing (this will need to match what's in your CONTENTFUL_ACCESS_TOKEN environment variable)
    • Leave the default content type (application/vnd.contentful.management.v1+json)
  8. Install the Algolia integration in Contentful and modify the resulting webhooks as necessary.