Compare commits
No commits in common. "ac2c1c96805fbafdf825852e4728dd9fbb9c2249" and "f29445ec4cfbb3b0f988201cd0331f71d44bb9e9" have entirely different histories.
ac2c1c9680
...
f29445ec4c
7 changed files with 4 additions and 115 deletions
1
Gemfile
1
Gemfile
|
@ -8,7 +8,6 @@ source "https://rubygems.org"
|
|||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
gem "jekyll", "~> 4.0.0"
|
||||
gem "html-proofer"
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
# gem "minima", "~> 2.5"
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
|
|
21
Gemfile.lock
21
Gemfile.lock
|
@ -8,19 +8,9 @@ GEM
|
|||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
eventmachine (1.2.7)
|
||||
ffi (1.12.2)
|
||||
forwardable-extended (2.6.0)
|
||||
html-proofer (3.15.1)
|
||||
addressable (~> 2.3)
|
||||
mercenary (~> 0.3)
|
||||
nokogumbo (~> 2.0)
|
||||
parallel (~> 1.3)
|
||||
rainbow (~> 3.0)
|
||||
typhoeus (~> 1.3)
|
||||
yell (~> 2.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
|
@ -51,16 +41,9 @@ GEM
|
|||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.8)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogumbo (2.0.2)
|
||||
nokogiri (~> 1.8, >= 1.8.4)
|
||||
parallel (1.19.1)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.3)
|
||||
rainbow (3.0.0)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
|
@ -71,21 +54,17 @@ GEM
|
|||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.3.1)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (1.2.6)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo-data (1.2019.3)
|
||||
tzinfo (>= 1.0.0)
|
||||
unicode-display_width (1.6.1)
|
||||
wdm (0.1.1)
|
||||
yell (2.2.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
html-proofer
|
||||
jekyll (~> 4.0.0)
|
||||
tzinfo (~> 1.2)
|
||||
tzinfo-data
|
||||
|
|
63
README.md
63
README.md
|
@ -1,64 +1,3 @@
|
|||
# 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.
|
||||
|
||||
## Usage
|
||||
Ensure that you have [Git](https://git-scm.org), [Ruby](https://www.ruby-lang.org) and [RubyGems](https://rubygems.org/) 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`:
|
||||
```yaml
|
||||
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:
|
||||
```yaml
|
||||
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`.
|
||||
A simple static Jekyll site for keeping track of recipes 0u0
|
|
@ -5,6 +5,6 @@
|
|||
<{{tag}}>Ingredients</{{tag}}>
|
||||
<ul>
|
||||
{% for item in page.ingredients -%}
|
||||
<li>{{ item[0] }} {% if item[2] %} {{ item[2] }} of {% endif %} {{ item[1] }}</li>
|
||||
<li>{{ item[0] }} {%- if item[2] -%} {{ item[2] }} of {%- endif -%} {{ item[1] }}</li>
|
||||
{% endfor -%}
|
||||
</ul>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel='stylesheet' href='/style.css'>
|
||||
<title>{{ page.title }}</title>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -19,12 +19,10 @@ layout: default
|
|||
<h2> Subrecipes </h2>
|
||||
{% for subrecipe in site.subrecipes -%}
|
||||
{%- if subrecipe.parents contains id -%}
|
||||
<div class='subrecipe' id='sr-{{ subrecipe.name | downcase | url_encode }}'>
|
||||
<h3>{{ subrecipe.name }}</h3>
|
||||
<div class='subrecipe-output'>
|
||||
<div class='subrecipe' id='sr-{{ subrecipe.name | downcase | url_encode }}'>
|
||||
{{ subrecipe.output }}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
|
25
style.css
25
style.css
|
@ -1,25 +0,0 @@
|
|||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.subrecipe {
|
||||
background-color: #eee;
|
||||
padding: 5px;
|
||||
}
|
||||
.subrecipe h3 {
|
||||
margin: 0;
|
||||
}
|
||||
.subrecipe-output {
|
||||
height: 0;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.subrecipe.open .subrecipe-output {
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: "- ";
|
||||
}
|
||||
ul, ol {
|
||||
list-style-position: inside;
|
||||
padding-left: 10px;
|
||||
}
|
Loading…
Reference in a new issue