Make about page editable from CMS

This commit is contained in:
Maël Brunet 2021-05-19 09:13:34 +02:00
parent d443a71d52
commit 0bd228b0e9
4 changed files with 13 additions and 2 deletions

View file

@ -7,6 +7,7 @@ My Online Cookbook is a starter kit to create your own website of recipes, using
Demo (this is what you get out of the box) : [https://myonlinecookbook.netlify.app/](https://myonlinecookbook.netlify.app/)
Get started now by forking the project or deploy to Netlify :
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/maeligg/my-online-cookbook&stack=cms)
## Features

View file

@ -20,7 +20,7 @@ bodyClass: c-home
</div>
</section>
{% if collections["Favourite ⭐"] %}}
{% if collections["Favourite ⭐"] %}
<section class="u-bgc-grey-100">
<div class="l-container">
<h2>{{ favouriteRecipes }}</h2>

View file

@ -41,4 +41,13 @@ collections:
- {label: "Author", name: "author", widget: "string"}
- {label: "Primary color", name: "primaryColor", widget: "color", hint: "make sure to choose a color that is light enough to display as a background behind dark text"}
- {label: "Secondary color", name: "secondaryColor", widget: "color", hint: "used for links and focus styles"}
- {label: "Search label", name: "searchLabel", widget: "string"}
- {label: "Search label", name: "searchLabel", widget: "string"}
- name: "pages"
label: "Pages"
files:
- name: "about"
label: "About page"
file: "src/about.md"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}

View file

@ -24,6 +24,7 @@ body {
main {
display: flex;
flex-direction: column;
margin-bottom: 30px;
}
// The x-cloak attribute is automatically removed from elements when Alpine initializes. They should not be visible before then to avoid flickering content