forked from chrisrhymes/bulma-clean-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request chrisrhymes#97 from chrisrhymes/feature/recipes
Add recipe layout
- Loading branch information
Showing
11 changed files
with
242 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<script type="application/ld+json"> | ||
{ | ||
"@context": "https://schema.org/", | ||
"@type": "Recipe", | ||
"name": "{{ page.title }}", | ||
"image": [ | ||
"{{ page.image }}" | ||
], | ||
"author": { | ||
"@type": "Person", | ||
"name": "{{ page.author }}" | ||
}, | ||
"datePublished": "{{ page.date }}", | ||
"description": "{{ page.description }}", | ||
"prepTime": "{{ page.prep_time }}", | ||
"cookTime": "{{ page.cook_time }}", | ||
"totalTime": "{{ page.total_time }}", | ||
"keywords": "{{ page.keywords }}", | ||
"recipeYield": "{{ page.recipe_yield }}", | ||
"recipeCategory": "{{ page.recipe_category }}", | ||
"recipeCuisine": "{{ page.recipe_cuisine }}", | ||
{% if page.calories %} | ||
"nutrition": { | ||
"@type": "NutritionInformation", | ||
"calories": "{{ page.calories }}" | ||
}, | ||
{% endif %} | ||
"recipeIngredient": | ||
{{ page.ingredients | jsonify }}, | ||
"recipeInstructions": [ | ||
{% for step in page.method %} | ||
{ | ||
"@type": "HowToStep", | ||
"text": "{{ step }}" | ||
{% if forloop.last == true %} | ||
} | ||
{% else %} | ||
}, | ||
{% endif %} | ||
{% endfor %} | ||
] | ||
} | ||
</script> | ||
|
||
<div class="columns is-multiline"> | ||
<div class="column is-4"> | ||
<div class="box"> | ||
<p class="title is-4">Ingredients</p> | ||
<div class="content"> | ||
<ul> | ||
{% for ingredient in page.ingredients %} | ||
<li>{{ ingredient }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="column is-8"> | ||
<p class="title is-4">Method</p> | ||
<div class="content"> | ||
<ol> | ||
{% for step in page.method %} | ||
<li>{{ step }}</li> | ||
{% endfor %} | ||
</ol> | ||
<p>Published: {{ page.date | date: "%b %-d, %Y" }} by {{ page.author }}</p> | ||
</div> | ||
<div class="content"> | ||
{{ content }} | ||
</div> | ||
</div> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
layout: recipe | ||
title: An Example Recipe Page | ||
subtitle: Tastes great and easy to cook | ||
description: An example recipe page | ||
author: CS Rhymes | ||
date: 2021-03-02 | ||
show_sidebar: false | ||
image: /bulma-clan-theme/img/recipe-example.jpg | ||
hero_image: /bulma-clean-theme/img/recipe-example.jpg | ||
hero_darken: true | ||
ingredients: | ||
- 1tsp vegetable oil | ||
- 2 Carrots, finely diced | ||
- 1 Onion, finely dices | ||
- 1 Celery stick, finely diced | ||
- 2 Cloves of Garlic, crushed | ||
- 400g lean Minced Beef | ||
- 400g tin of Chopped Tomatoes | ||
- 2tbsp Tomato Puree | ||
- 300ml Beef Stock | ||
- 1tsp Worcestershire Sauce | ||
- 2tsp Italian Herbs | ||
- Salt and Pepper | ||
method: | ||
- Heat the vegetable oil in a large pan on a medium heat, then add the carrots, onion and celery and cook for five to ten minutes to soften, stirring occasionally | ||
- Add the crushed garlic and cook for 2 more minutes, stiffing occasionally | ||
- Add the minced beef to the pan, breaking it up with a wooden spoon and cook until browned off | ||
- Add the chopped tomatoes, tomato puree, beef stock, worcestershire sauce and italian herbs and stir. Add a pinch of salt and pepper then stir through | ||
- Bring to a gentle simmer and cook for 30 minutes | ||
prep_time: PT10M | ||
cook_time: PT1H | ||
total_time: PT1H10M | ||
keywords: recipe,cooking | ||
recipie_yield: 4 | ||
recipe_category: Main course | ||
recipe_cuisine: Italian | ||
calories: 500 calories | ||
--- | ||
|
||
Photo by <a href="https://stocksnap.io/author/36317">Janko Ferlic</a> from <a href="https://stocksnap.io">StockSnap</a> | ||
|
||
## Recipe Page Instructions | ||
|
||
This is an example recipe page, generated from page's front matter. You can make a single page using this layout, or you can use it in your blog by specifying the layout as recipe instead of post. | ||
|
||
You probably want to hide the sidebar, so the recipe takes up the whole page width. If you add any additional content to the page it will appear below the recipe details. | ||
|
||
Create a list in the front matter for the ingredients, then the method steps and it will automatically be added to the page. | ||
|
||
The front matter will also be added to the page as schema data that is used by search engines. Please see the below example for all of the schema options available. | ||
|
||
```yaml | ||
layout: recipe | ||
title: An Example Recipe Page | ||
subtitle: Tastes great and easy to cook | ||
author: CS Rhymes | ||
date: 2021-03-02 | ||
show_sidebar: false | ||
image: /bulma-clan-theme/img/recipe-example.jpg | ||
hero_image: /bulma-clean-theme/img/recipe-example.jpg | ||
ingredients: | ||
- 1tsp vegetable oil | ||
- 2 Carrots, finely diced | ||
- 1 Onion, finely dices | ||
- 1 Celery stick, finely diced | ||
- 2 Cloves of Garlic, crushed | ||
- 400g lean Minced Beef | ||
- 400g tin of Chopped Tomatoes | ||
- 2tbsp Tomato Puree | ||
- 300ml Beef Stock | ||
- 1tsp Worcestershire Sauce | ||
- 2tsp Italian Herbs | ||
- Salt and Pepper | ||
method: | ||
- Heat the vegetable oil in a large pan on a medium heat, then add the carrots, onion and celery and cook for five to ten minutes to soften, stirring occasionally | ||
- Add the crushed garlic and cook for 2 more minutes, stiffing occasionally | ||
- Add the minced beef to the pan, breaking it up with a wooden spoon and cook until browned off | ||
- Add the chopped tomatoes, tomato puree, beef stock, worcestershire sauce and italian herbs and stir. Add a pinch of salt and pepper then stir through | ||
- Bring to a gentle simmer and cook for 30 minutes | ||
prep_time: PT10M | ||
cook_time: PT1H | ||
total_time: PT1H10M | ||
keywords: recipe,cooking | ||
recipie_yield: 4 | ||
recipe_category: Main course | ||
recipe_cuisine: Italian | ||
calories: 500 calories | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters