Skip to content

A website for an amateur theater in Brno built in Gatsby with content pulled from Kentico Kontent.

License

Notifications You must be signed in to change notification settings

CollierCZ/czechtheater

Repository files navigation

Czech Theater

Netlify Status Maintainability Test Coverage

A website for an amateur theater in Brno built using SvelteKit with content pulled from Kontent.ai.

Run in development

To run the site in development, follow these steps:

  1. Install dependencies by running npm install.

  2. Add your Kontent.ai environment ID in a .env file:

    PUBLIC_KONTENT_ENVIRONMENT_ID=abc123
  3. Start a development server:

    npm run dev
    
    # or start the server and open the app in a new browser tab
    npm run dev:open

Build the site

To create a production version of your app, follow these steps:

  1. Add your Kontent.ai environment ID to the environment:

    export PUBLIC_KONTENT_ENVIRONMENT_ID=abc123
  2. Build the site:

    npm run build

You can preview the production build by running npm run preview.

Content model

You can find the model for the content types in Kontent.ai in the src/kontent-types directory.

They were generated using the Kontent.ai Model Generator.

Generate new types

If the content model changes, you can generate new types. You need a Management API key. Then run this command:

npx kontent-generate --exportRoles=false --exportWebhooks=false --outputDir=./src/kontent-types --environmentId=<ENVIRONMENT_ID> --apiKey=<API_KEY>

Preview draft content

You can run the site locally with draft content to preview how it looks. Only run it locally unless you don't worry about draft content becoming public.

To do so, follow these steps:

  1. Create a Kontent Delivery API key with content preview permissions.
  2. Save the API key and preview as true in your .env file:
    PUBLIC_KONTENT_PREVIEW_API_KEY=abc123
    PUBLIC_KONTENT_PREVIEW=true

About

A website for an amateur theater in Brno built in Gatsby with content pulled from Kentico Kontent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published