Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
date: 2017-06-24T18:38:50.121Z
title: Apple Jam
layout: recipe
description: Jam made of apples tastes awesome.
text: Apples
url: /images/uploads/apples.jpg
- ingredient:
amount: '1'
name: apples
unit: kg
- ingredient:
amount: '0.5'
name: water
unit: dl
- ingredient:
amount: '5'
name: sugar
unit: dl
## Method
1. Scale and kernel of the apples. Place the peeled apple slices in a bowl of cold water so that they do not darken.
2. Lift the apples to a saucepan and add water. Boil on low heat and stir regularly. Stir the sugar when the apples soften (feel a test piece). Let boil again.
3. Mix the mash to the desired consistency with a rod mixer.
4. In the fridge the mash stays for 1-2 weeks. In freezer it will last up to a year.
baseURL = ""
languageCode = "en-us"
title = "JAMstack Recipes"
name: github
repo: hlaueriksson/jamstack-cms # Path to your Github repository
branch: master # Branch to update
media_folder: "src/site/static/images/uploads" # Media files will be stored here
public_folder: "/images/uploads" # The src attribute for uploaded media
- name: "recipe" # Used in routes, e.g. /admin/collections/recipe
label: "Recipe" # Used in the UI
folder: "src/site/content/recipe" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{slug}}" # Filename template i.e.
fields: # The fields for each document, usually in front matter
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Layout", name: "layout", widget: "hidden", default: "recipe"}
- {label: "Description", name: "description", widget: "text"}
- label: "Image"
name: "image"
widget: "object"
- {label: "Text", name: "text", widget: "string"}
- {label: "URL", name: "url", widget: "image"}
- label: "Ingredients"
name: "ingredients"
widget: "list"
- label: "Ingredient"
name: "ingredient"
widget: "object"
- {label: "Amount", name: "amount", widget: "number"}
- {label: "Unit", name: "unit", widget: "select", options: ["", "dl", "l", "kg"]}
- {label: "Name", name: "name", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
<!doctype html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
<link rel="stylesheet" href="" />
<script src=""></script>
{{ partial "header" . }}
<div id="data" data-slug="{{ .File.TranslationBaseName }}" data-api="{{ .Site.Data.api.recipe.get_ingredients }}"></div>
<div class="row marketing">
<div class="col">
<h1>{{ .Title }}</h1>
<p>{{ $.Param "description" }}</p>
<img src="{{ $.Param "image.url" }}" class="img-fluid" alt="{{ $.Param "image.text" }}" />
<div id="measurements">
<span>Display measurements in:</span>
<select id="system">
<option value="metric">Metric System</option>
<option value="imperial">Imperial System</option>
<ul id="metric" class="ingredients">
{{ range $.Param "ingredients" }}
<li>{{ .ingredient.amount }} {{ .ingredient.unit }} {{ }}</li>
{{ end }}
<ul id="imperial" class="ingredients"></ul>
{{ .Content | markdownify }}
{{ partial "footer" . }}
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<p>{{ $.Param "description" }}</p>
<a href="{{ .Permalink }}">
<img src="{{ $.Param "image.url" }}" class="img-fluid" alt="{{ $.Param "image.text" }}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.