added tag, expanded on the readme
This commit is contained in:
parent
0cce5d54cf
commit
49141a225b
2 changed files with 25 additions and 5 deletions
28
README.md
28
README.md
|
@ -1,7 +1,7 @@
|
||||||
# recipe-site
|
# recipe-site
|
||||||
[![Build Status](https://drone.bune.city/api/badges/lynnesbian/recipe-site/status.svg)](https://drone.bune.city/lynnesbian/recipe-site)
|
[![Build Status](https://drone.bune.city/api/badges/lynnesbian/recipe-site/status.svg)](https://drone.bune.city/lynnesbian/recipe-site)
|
||||||
|
|
||||||
A simple static [Jekyll](https://jekyllrb.com) site for keeping track of recipes. This is my first major Jekyll project, so it might be a little messy.
|
A simple static [Jekyll](https://jekyllrb.com) site for keeping track of recipes. This is my first major Jekyll project, so it might be a little messy. **This project is a work in progress.**
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Ensure that you have [Git](https://git-scm.org), [Ruby](https://www.ruby-lang.org) and [RubyGems](https://rubygems.org/) installed.
|
Ensure that you have [Git](https://git-scm.org), [Ruby](https://www.ruby-lang.org) and [RubyGems](https://rubygems.org/) installed.
|
||||||
|
@ -12,12 +12,13 @@ $ gem install bundler
|
||||||
$ bundle install
|
$ bundle install
|
||||||
$ bundle exec jekyll build
|
$ bundle exec jekyll build
|
||||||
```
|
```
|
||||||
This will compile the website into the `_site` directory, which you may serve with the HTTP server of your choice.
|
This will compile the website into the `_site` directory, which you may serve with any HTTP server. It is necessary to re-run `bundle exec jekyll build` after any modifications.
|
||||||
|
|
||||||
Alternatively, you can use jekyll's built in server for testing:
|
Alternatively, you can use jekyll's built in server for testing:
|
||||||
```
|
```
|
||||||
$ bundle exec jekyll serve
|
$ bundle exec jekyll serve
|
||||||
```
|
```
|
||||||
|
_The built in server will automatically regenerate the `_site` output whenever you make a change._
|
||||||
|
|
||||||
However, there won't be much to look at until you add some recipes!
|
However, there won't be much to look at until you add some recipes!
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@ Recipes are found in `_recipes/`, with subrecipes located in `_subrecipes/`.
|
||||||
Here's an example recipe, which could be saved to `_recipes/chocolate_cake.yml`:
|
Here's an example recipe, which could be saved to `_recipes/chocolate_cake.yml`:
|
||||||
```yaml
|
```yaml
|
||||||
name: Chocolate cake
|
name: Chocolate cake
|
||||||
|
author: Jane Crocker
|
||||||
layout: recipe
|
layout: recipe
|
||||||
|
|
||||||
ingredients:
|
ingredients:
|
||||||
|
@ -41,10 +43,11 @@ method:
|
||||||
time: 240
|
time: 240
|
||||||
```
|
```
|
||||||
- `name` (string) - The displayed name of the recipe. Does not appear in the URL.
|
- `name` (string) - The displayed name of the recipe. Does not appear in the URL.
|
||||||
|
- `author` (string, optional) - The author of the recipe.
|
||||||
- `layout` (string) - The template to use; should always be `recipe`.
|
- `layout` (string) - The template to use; should always be `recipe`.
|
||||||
- `ingredients` (list) - Each entry in `ingredients` consists of an amount, ingredient name, and unit terminology. `[2, flour, cups]` is displayed as `2 cups of flour`, while `[1, egg, null]` is displayed as `1 egg`.
|
- `ingredients` (list) - Each entry in `ingredients` consists of an amount, ingredient name, and unit terminology. `[2, flour, cups]` is displayed as `2 cups of flour`, while `[1, egg, null]` is displayed as `1 egg`. The third field is optional - `[1, egg, null]` is the same as `[1, egg]`.
|
||||||
- `method` (list) - A list of steps undertaken to create the recipe, written in plain English. Or whatever language you prefer.
|
- `method` (list) - A list of steps undertaken to create the recipe, written in plain English. Or whatever language you prefer.
|
||||||
- `time` (string) - The time it takes to make the recipe in minutes.
|
- `time` (string, optional) - The time it takes to make the recipe in minutes.
|
||||||
|
|
||||||
The recipe's file name isn't important, but it's good practice to make it something obvious, like `chocolate_cake.yml` and not `strawberry_pie.yml`.
|
The recipe's file name isn't important, but it's good practice to make it something obvious, like `chocolate_cake.yml` and not `strawberry_pie.yml`.
|
||||||
|
|
||||||
|
@ -62,3 +65,20 @@ parents:
|
||||||
- chocolate_cupcakes
|
- chocolate_cupcakes
|
||||||
```
|
```
|
||||||
The entries in `parents` refer to the filenames of the parent recipes - `chocolate_cake` refers to `chocolate_cake.yml`.
|
The entries in `parents` refer to the filenames of the parent recipes - `chocolate_cake` refers to `chocolate_cake.yml`.
|
||||||
|
|
||||||
|
If a subrecipe does not have at least one valid `parents` entry, it will not appear anywhere on the website.
|
||||||
|
|
||||||
|
### Licensing
|
||||||
|
This software is licensed under the [Apache 2.0 license](https://choosealicense.com/licenses/apache-2.0/).
|
||||||
|
|
||||||
|
Copyright 2020 Lynnesbian
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
|
@ -14,7 +14,7 @@ layout: default
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
<h1>{{ page.name }}</h1>
|
<h1>{{ page.name }}</h1>
|
||||||
<p class='subtle'> {{ page.method.size }} steps - Estimated cooking time: {{ page.time | default: "Not provided" }}</p>
|
<p class='subtle'> {{ page.method.size }} steps - Estimated cooking time: {{ page.time | default: "Not provided" }} {% if page.author %} - By {{ page.author }} {% endif %}</p>
|
||||||
{%- if applicable_subrecipes %}
|
{%- if applicable_subrecipes %}
|
||||||
<h2> Subrecipes </h2>
|
<h2> Subrecipes </h2>
|
||||||
{% for subrecipe in site.subrecipes -%}
|
{% for subrecipe in site.subrecipes -%}
|
||||||
|
|
Loading…
Reference in a new issue