jungvonmatt / wekit

A Jamstack kit for Contentful, Hugo and Netlify.
https://www.wekit.dev
MIT License
14 stars 4 forks source link

Overview

This is a Jamstack kit helping you build secure (Mozilla Observatory: A+ score), fast (Lighthouse: 100 scores), multilingual and highly maintainable sites with Contentful (Compose ready) and Hugo.

Hugo Modules

Packages

App Templates

Requirements

Make sure all dependencies have been installed:

Set up Contentful:

Getting started

The easiest way to kickstart a new WEKit project using Contentful and Hugo is by using @jungvonmatt/create-wekit-app. This CLI tool enables you to quickly setup a new WEKit application, with everything set up for you. To get started, use the following command:

npx @jungvonmatt/create-wekit-app@latest

The script takes care of the most important settings:

After that, you can try out the new app. To do so, change to the newly created directory and run npm run storybook. This will start the Storybook development environment with all the UI components you selected. You can also start the Hugo development server by running npm start. However, you will only see an empty page because no entries have been created in Contentful yet.

Nice job so far. Now you can easily deploy your site to Netlify.

First, push the app to GitHub:

# Replace the origin with the correct URL to your repo
git remote add origin git@github.com:{ACCOUNT}/{REPO}.git`
git branch -M main
git push -u origin main

Create and configure a continuous deployment for a new site in Netlify:

And last but not least we set up a webhook in Contentful:

You are now ready to deploy. Open the "Deploy to production" content entry and click Deploy. Switch to Netlify and check whether the webhook has run in. The build should now start and after a short while... Site is live ✨

Get involved

PRs Welcome

We appreciate any help on our repositories. For more details about how to contribute, see our CONTRIBUTING.md document.

Contributors

You found a bug or want to propose a feature?

License

This repository is published under the MIT license.