Skip to content

Showcase of the Svelte application using Sapper and Kentico Kontent as the content source.

License

Notifications You must be signed in to change notification settings

Simply007/kontent-sample-app-svelte-sapper

 
 

Repository files navigation

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.

About

Showcase of the Svelte application using Sapper and Kentico Kontent as the content source.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 65.1%
  • JavaScript 26.8%
  • CSS 5.1%
  • HTML 2.8%
  • Shell 0.2%