Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 2.83 KB

File metadata and controls

75 lines (47 loc) · 2.83 KB

Build a Website on a Headless CMS with Svelte

Preview

Working repository for based on ReactiveConf 2019 workshop repository. The goal is to showcase a website for fictional café with Svelte, Sapper, and Kentico Kontent. The result can be deployed to ZEIT.

showcase of the site home page

Prerequisites

  • Node 10+
  • npm 6+
  • now

Getting started

  1. Clone the repository

    git clone https://github.com/Simply007/kontent-sample-app-svelte-sapper
  2. Install the packages

    npm install
  3. Register on Kentico Kontent

  4. Create an empty project

  5. Enable Content Management API

  6. Import content.zip data using Template manager

    • Use Project Id and Content Management API key from previously generated project.
  7. Place the PROJECT_ID to the src/cms.js configuration file.

  8. Run development environment

    npm run dev

🚀 Your site is now running at http://localhost:3000!

Functionality

Kontent.

Most of the content on the site is hard-coded. If you navigate to /offer section the food data and it's categories is stored Kentico Kontent.

Data in Kentico kontent propagated to the website

Deployment

Deployment could be performed using ZEIT's Now which is fully integrated GitHub.

Build

Build is perfomed in two steps, first you run npm run build and then npm run export. For more info visit Sapper documentation.

Prettier

If you run npm run prettier, the source code is formatted using Prettier.

Cypress (end-to-end testing)

If you run npm run test, it will run end-to-end tests defined in /cypress folder.

Thanks

Original project was based on now-sapper-demo by @antony and then showcased on Reactive Conference 2019 in Prague on the workshop from Social Bakers by Jan Vlnas.