aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2017-02-23 10:21:12 +0100
committerJoris2017-02-23 10:21:12 +0100
commit0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc (patch)
tree74fc9840598a6931e5deb8a145054e0f00fe8988
parent8e396abf9f55141f3b6ebab4577edefcbc010c10 (diff)
downloadcooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.tar.gz
cooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.tar.bz2
cooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.zip
Add shortbread recipe
-rw-r--r--.tmuxinator.yml2
-rw-r--r--Cooking.cabal1
-rw-r--r--Makefile5
-rw-r--r--recipes/shortbread.md42
-rw-r--r--shell.nix4
-rw-r--r--src/Cooking.hs (renamed from Cooking.hs)4
6 files changed, 54 insertions, 4 deletions
diff --git a/.tmuxinator.yml b/.tmuxinator.yml
index c3a79fc..f6e037e 100644
--- a/.tmuxinator.yml
+++ b/.tmuxinator.yml
@@ -5,4 +5,4 @@ windows:
layout: fff4,119x58,0,0{94x58,0,0,0,24x58,95,0,1}
panes:
- # Empty
- - make install watch
+ - make clean install watch
diff --git a/Cooking.cabal b/Cooking.cabal
index 64cea49..7f5117d 100644
--- a/Cooking.cabal
+++ b/Cooking.cabal
@@ -5,6 +5,7 @@ cabal-version: >= 1.10
executable Cooking
main-is: Cooking.hs
+ hs-source-dirs: src
ghc-options: -threaded
default-language: Haskell2010
build-depends: base
diff --git a/Makefile b/Makefile
index cbe04d2..62f36a6 100644
--- a/Makefile
+++ b/Makefile
@@ -12,4 +12,7 @@ build:
@cabal run build
watch:
- @cabal run watch
+ @nodemon --watch src -e hs --exec 'make watch-command --silent'
+
+watch-command:
+ @(killall Cooking || :) && sleep 1 && cabal run watch
diff --git a/recipes/shortbread.md b/recipes/shortbread.md
new file mode 100644
index 0000000..e5bf2d6
--- /dev/null
+++ b/recipes/shortbread.md
@@ -0,0 +1,42 @@
+---
+title: Shortbread
+---
+
+Ingrédients
+-----------
+
+- 175 g de farine.
+- 175 g de beurre.
+- 60 g de cassonade.
+- 40 cl de lait concentré sucré.
+- 20 cl de lait concentré non sucré.
+- 150 g de chocolat noir.
+- 1 CS de Maïzena.
+
+Recette
+-------
+
+### Biscuit
+
+#. Sortir le beurre pour le ramollir à température ambiante.
+#. Préchauffer le four à 190°C.
+#. Beurrer les parois d’un moule carré ou recouvrer-le de papier sulfurisé.
+#. Mélanger la farine, la cassonade et 125 g de beurre mou en morceaux.
+#. Étaler la pâte obtenue dans le moule.
+#. Piquer la préparation à la fourchette.
+#. Enfourner 10 minutes.
+
+### Caramel
+
+#. Mettre 50 g de beurre à fondre dans une casserole.
+#. Toujours en cuisson, y ajouter les laits concentrés. et la Maïzena.
+#. Remuer jusqu’à l’obtention d’une crème épaisse à la couleur dorée.
+#. Verser le caramel crémeux sur le biscuit.
+#. Laisser refroidir.
+
+### Chocolat
+
+#. Casser le chocolat en morceaux dans une casserole.
+#. Le faire fondre à feu doux avec une cuillère à soupe d’eau.
+#. Recouvrir le caramel avec le chocolat fondu.
+#. Laisser refroidir.
diff --git a/shell.nix b/shell.nix
index eb2427e..6ede61e 100644
--- a/shell.nix
+++ b/shell.nix
@@ -2,14 +2,14 @@ with import <nixpkgs> {}; {
env = stdenv.mkDerivation {
name = "env";
buildInputs = with pkgs; [
- # ghc
cabal-install
cabal2nix
tmux
tmuxinator
+ nodePackages.nodemon
(haskellPackages.ghcWithPackages (p: with p; [
(haskell.lib.dontCheck hakyll)
- clay
+ (haskell.lib.dontCheck clay)
text
]))
];
diff --git a/Cooking.hs b/src/Cooking.hs
index 809f50f..e5f92b9 100644
--- a/Cooking.hs
+++ b/src/Cooking.hs
@@ -1,7 +1,11 @@
{-# LANGUAGE OverloadedStrings #-}
+import Data.List (sortBy)
import Data.Monoid (mappend)
+import Data.Ord (comparing)
+
import Hakyll
+import Hakyll.Core.Item (Item(itemIdentifier))
main :: IO ()
main = hakyllWith configuration $ do