add a help file, expand on the readme a bit
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Lynne Megido 2020-03-06 05:17:41 +10:00
parent 641fbd7c74
commit 1620a1b7ae
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
3 changed files with 24 additions and 4 deletions

View File

@ -50,7 +50,7 @@ time: 240
- `author` (string, optional) - The author of the recipe.
- `difficulty` (float, optional) - The difficulty of the recipe on a scale of 1 to 5. Will be displayed as a star rating. Half stars (e.g. "2.5") are allowed.
- `ingredients` (list) - Each entry in `ingredients` is an array consisting of up to four items:
- amount (number or array) - The amount of this item to add, e.g. `2` for 2 cups of flour.
- amount (number or array) - The amount of this item to add, e.g. `2` for 2 cups of flour. Non-whole numbers will be displayed as fractions, e.g. `1.5` becomes `1½`.
- If this is `0`, the output will be e.g. "jalepeño chillis to taste" rather than "0 jalepeño chillis".
- If this is an array, it will be printed as `amount[0] to amount[1]`. For example, if you wanted to say "2 to 3 cups of peas", you would write `[[2, 3], peas, cups]`.
- ingredient name (string) - The name of the ingredient, e.g. `flour` for 2 cups of flour.
@ -61,7 +61,7 @@ time: 240
The recipe's file name isn't important, but it's good practice to make it something obvious, like `chocolate_cake.md` and not `strawberry_pie.md`.
The recipe files are standard YAML. Every recipe **must** begin and end with three dashes [to ensure that Jekyll processes it](https://jekyllrb.com/docs/front-matter/). Jekyll only processes files with certain extensions. Even though the recipes are formatted as YAML, they can't be saved as `.yml` or `.yaml` files - they must be saved with an extension that Jekyll will process, like `.md` or `.html`.
The recipe files are standard YAML. Every recipe **must** begin and end with three dashes [to ensure that Jekyll processes it](https://jekyllrb.com/docs/front-matter/). Jekyll only processes files with certain extensions. Even though the recipes are formatted as YAML, they can't be saved as `.yml` or `.yaml` files - they must be saved with an extension that Jekyll will process, like `.md` or `.html`. Additionally, any tags not marked as optional **must** be included in order for the file to render properly.
Good:
```yaml
@ -77,7 +77,7 @@ name: Example
### Subrecipes
Subrecipes behave a little differently to regular recipes:
- They don't show up on the home page
- The `time` tag is not supported
- The `time`, `author`, `difficulty` and `ratings` tags do not do anything. They can still be included, but won't be displayed.
Subrecipes have a tag that regular recipes do not - the `parents` tag. This is a list of recipes that the subrecipe should be included in. For example:
```yaml

View File

@ -1,4 +1,4 @@
<footer>
{% if page.url != '/' %}<a href='/'>Home</a> - {% endif %}<a href='https://git.bune.city/lynnesbian/recipe-site'>Source code</a> <br>
{% if page.url != '/' %}<a href='/'>Home</a> - {% endif %}<a href='https://git.bune.city/lynnesbian/recipe-site'>Source code</a>{% if page.title != 'Help' %} - <a href='/help.html'>Help</a>{% endif %} <br>
Design by <a href='https://lynnesbian.space'>Lynne</a> - Site last built <time datetime='{{ site.time | date: "%Y-%m-%d %R:%S" }}'>{{ site.time | date_to_long_string: "ordinal" }} at {{ site.time | date: "%R" }}</time>
</footer>

20
help.html Normal file
View File

@ -0,0 +1,20 @@
---
title: Help
layout: default
---
<h2>Using the site</h2>
<p>
Here are a few tips and tricks you might find useful:
</p>
<ul>
<li>While working on a recipe, you can click on any step in the Method section to mark it as complete to help you keep track of how far along you are. You can undo this by clicking it again.</li>
<li>Hovering over a fraction will display its decimal equivalent. For example, hovering over "{{ 1.25 | fractionalise }}" will show "1.25".</li>
<li>Recipes can be printed by using your browser's built in print function. The output will be in black and white, and subrecipes will automatically be expanded.</li>
</ul>
<h2>Creating recipes</h2>
<p>
You can create your own recipe by placing a properly formatted file in the <tt>_recipes</tt> directory in the Jekyll project folder. Note that creating recipes through the web UI is not possible.
</p>
<p>
For information about the recipe format, subrecipes, and more, see <a href='https://git.bune.city/lynnesbian/recipe-site/src/branch/master/README.md#user-content-recipe-file-format'>the README</a>.
</p>