This is a template for building a simple blog website with Eleventy and Sveltia CMS, with automatic deployment to Netlify.
The aim is to get you up and running in a few minutes with a free, fast, and secure blog website with a headless CMS for editing your content.
Optionally, you can Deploy to this template to Netlify which will create a new GitHub repository for you and link it to your Netlify account, configuring automatic deploys in one step.
Important: You will still need to configure the CMS and set up an OAuth application in GitHub to be able to authenticate and use the CMS on your live site (see steps below).
npm install
admin/config.yml
and enter your GitHub repo details using the existing format and push your changes._data/settings.yml
with your site title, description, and Netlify site URL and push your changes to GitHub.https://[your-netlify-site].netlify.app/admin/
and follow the steps to log in to the CMS with your GitHub account.You can work locally with Eleventy and the CMS without needing to configure any GitHub authentication. Make sure you've followed the Install this template steps above first.
npx eleventy --serve
.http://localhost:8080/
..eleventy.js
due to a conflict with Sveltia CMS, therefore you'll need to manually reload the page in the browser to see your changes.http://localhost:8080/admin/
and press the Work with Local Repository button, and select your local repo root folder.Sveltia CMS needs to be connected to your GitHub account so it can authenticate you and make changes to your live site's content. Netlify facilitates this connection to GitHub for you. Note that all of your CMS users will need to have push access permissions to your content repository before they can log in. Sveltia CMS does not yet support Netlify CMS's Git Gateway authentication method.
https://api.netlify.com/auth/done
. For the Homepage URL enter your Netlify site URL e.g. https://[your-netlify-site].netlify.app
. The other fields can contain anything you want.admin/config.yml
file:backend:
name: github
repo: owner-name/repo-name # Path to your GitHub repository
branch: master # Optional, defaults to master
https://[your-netlify-site].netlify.app/admin/
.Sveltia CMS connects to your GitHub repo in the background via GitHub's GraphQL API. It uses your admin/config.yml
file to know what your site's data looks like (pages, blog posts etc).
When you edit content through the CMS, it makes changes to the content files in your repo as git commits. Each time you make an edit and save your changes, it pushes a new commit to your repo which in turn triggers a new Netlify build of your site. This type of workflow is commonly referred to as Continuous Deployment (CD).
All of your content edits are saved in your git repo commit history so you can roll back to a previous version of your site at any time using standard git commands, or by using the GitHub.com website UI.
If you choose to install this project locally, you can use the CMS to make changes to your local repo, and then manually push those changes to your remote (see steps above). This will trigger a new Netlify build of your site.
If you need help setting up this template, or if you have any ideas or suggestions, head over to Discussions and create a new discussion.
If you've found a bug or think something in this template is broken (very possible) please open a new issue and provide as much information as you can to ensure a fast solution.
If you have a question specifically related to the Sveltia CMS project, we recommend you to head over there and open a discussion for faster support.