A simple static Jekyll site for keeping track of recipes 0u0
Go to file
Lynne Megido 0cce5d54cf
replaced gitea's weird apache2 license version with the one from apache.org
2020-03-01 06:34:21 +10:00
.vscode setup jekyll structure 2020-03-01 02:07:24 +10:00
_includes minor styling, added footer 2020-03-01 06:26:37 +10:00
_layouts minor styling, added footer 2020-03-01 06:26:37 +10:00
.drone.yml added drone CI config 2020-03-01 02:10:14 +10:00
.gitignore render recipes with embedded subrecipes, print some meta information, etc 2020-03-01 04:05:06 +10:00
Gemfile added missing html-proofer dependency 2020-03-01 05:21:23 +10:00
Gemfile.lock added missing html-proofer dependency 2020-03-01 05:21:23 +10:00
LICENSE replaced gitea's weird apache2 license version with the one from apache.org 2020-03-01 06:34:21 +10:00
README.md add a nice readme with proper format documentation and everything! 2020-03-01 05:31:17 +10:00
_config.yml render recipes with embedded subrecipes, print some meta information, etc 2020-03-01 04:05:06 +10:00
index.html render recipes with embedded subrecipes, print some meta information, etc 2020-03-01 04:05:06 +10:00
style.css minor styling, added footer 2020-03-01 06:26:37 +10:00

recipe-site

Build Status

A simple static Jekyll site for keeping track of recipes. This is my first major Jekyll project, so it might be a little messy.

Usage

Ensure that you have Git, Ruby and RubyGems installed.

$ git clone https://git.bune.city/lynnesbian/recipe-site
$ cd recipe-site
$ gem install bundler
$ bundle install
$ bundle exec jekyll build

This will compile the website into the _site directory, which you may serve with the HTTP server of your choice.

Alternatively, you can use jekyll's built in server for testing:

$ bundle exec jekyll serve

However, there won't be much to look at until you add some recipes!

Recipe file format

Recipes are found in _recipes/, with subrecipes located in _subrecipes/.

Here's an example recipe, which could be saved to _recipes/chocolate_cake.yml:

name: Chocolate cake
layout: recipe

ingredients:
- [1, egg, null]
- [2, butter, sticks]
- [2, flour, cups]
# et cetera
method:
- Preheat the oven to 200°C
- Whisk the egg finely
# et cetera
time: 240
  • name (string) - The displayed name of the recipe. Does not appear in the URL.
  • 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.
  • 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.

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.

Subrecipes

Subrecipes behave a little differently to regular recipes:

  • They don't show up on the home page
  • The time tag is not supported
  • layout should be subrecipe

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:

name: Chocolate icing
parents:
- chocolate_cake
- chocolate_cupcakes

The entries in parents refer to the filenames of the parent recipes - chocolate_cake refers to chocolate_cake.yml.