Setup netlify cms

This commit is contained in:
Maël Brunet 2021-05-17 22:59:39 +02:00
parent 49b2733d25
commit 314c84e2ce
3 changed files with 35 additions and 1 deletions

View file

@ -4,7 +4,7 @@
My Online Cookbook is a starter kit to create your own website of recipes, using [Eleventy](https://11ty.io) and [Netlify CMS](https://www.netlifycms.org/). It is meant to be both highly accessible (including to non-developers), as well as fully customisable should you want to use it as a starting off point.
Demo (this is what you get out of the box) : [myonlinecookbook.netlify.app](myonlinecookbook.netlify.app)
Demo (this is what you get out of the box) : [https://myonlinecookbook.netlify.app/](https://myonlinecookbook.netlify.app/)
## Features

19
src/admin/config.yml Normal file
View file

@ -0,0 +1,19 @@
backend:
name: git-gateway
branch: main
media_folder: "src/recipe-images"
public_folder: "/recipe-images"
collections:
- name: "recipes"
label: "Recipes"
folder: "src/recipes"
create: true
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Preparation time", name: "time", widget: "string"}
- {label: "Number of servings", name: "servings", widget: "number"}
- {label: "Source of the recipe", name: "sourceLabel", widget: "string"}
- {label: "URL of the source of the recipe", name: "sourceURL", widget: "string"}
- {label: "Ingredients", name: "ingredients", widget: "list"}

15
src/admin/index.html Normal file
View file

@ -0,0 +1,15 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
<!-- Netlify Identity Widget -->
<script type="text/javascript" src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</body>
</html>