summaryrefslogtreecommitdiff
path: root/provider/posts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-08-03 18:34:02 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-08-03 18:34:02 +0200
commit2d4c925e7f11d1ba04b973753eb1a947622ce806 (patch)
tree065506a602fa3bf9d772a7069a8fb1ac6c454651 /provider/posts
parent9b857aea3cb21c0b63aba24d3379649580b9601b (diff)
downloaddirty-haskell.org-2d4c925e7f11d1ba04b973753eb1a947622ce806.tar
dirty-haskell.org-2d4c925e7f11d1ba04b973753eb1a947622ce806.tar.gz
dirty-haskell.org-2d4c925e7f11d1ba04b973753eb1a947622ce806.tar.bz2
dirty-haskell.org-2d4c925e7f11d1ba04b973753eb1a947622ce806.tar.xz
dirty-haskell.org-2d4c925e7f11d1ba04b973753eb1a947622ce806.zip
Line numbers
Diffstat (limited to 'provider/posts')
-rw-r--r--provider/posts/hakyll.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/provider/posts/hakyll.md b/provider/posts/hakyll.md
index 77e1736..844616b 100644
--- a/provider/posts/hakyll.md
+++ b/provider/posts/hakyll.md
@@ -34,7 +34,7 @@ function to add new tags to an already existing
34[Tags](http://hackage.haskell.org/package/hakyll-4.7.2.2/docs/Hakyll-Web-Tags.html#t:Tags) 34[Tags](http://hackage.haskell.org/package/hakyll-4.7.2.2/docs/Hakyll-Web-Tags.html#t:Tags)
35structure and used it to add my desired pseudo-tag. 35structure and used it to add my desired pseudo-tag.
36 36
37~~~ {.haskell} 37~~~ {.haskell .numberLines}
38main = hakyllWith config $ do 38main = hakyllWith config $ do
39 39
40 tags <- buildTags "posts/*" tagTranslation' >>= addTag "All Posts" "posts/*" 40 tags <- buildTags "posts/*" tagTranslation' >>= addTag "All Posts" "posts/*"
@@ -61,7 +61,7 @@ A trick I used to implement the desired behaviour of replacing old posts with
61the corresponding template to only print "…". 61the corresponding template to only print "…".
62Trimming the list of posts is straightforward. 62Trimming the list of posts is straightforward.
63 63
64~~~ {.haskell} 64~~~ {.haskell .numberLines}
65renderTag :: String -- ^ Tag name 65renderTag :: String -- ^ Tag name
66 -> Tags 66 -> Tags
67 -> Compiler (Item String) 67 -> Compiler (Item String)
@@ -100,7 +100,7 @@ I was stumped for a while when my templates wouldn´t
100This was easily rectified by realising, that even templates need (of course) a 100This was easily rectified by realising, that even templates need (of course) a
101declaration of how to compile them: 101declaration of how to compile them:
102 102
103~~~ {.haskell} 103~~~ {.haskell .numberLines}
104main = hakyllWith config $ do 104main = hakyllWith config $ do
105 match "templates/*" $ compile templateCompiler 105 match "templates/*" $ compile templateCompiler
106 106
@@ -122,7 +122,7 @@ twice.
122 122
123So I did: 123So I did:
124 124
125~~~ {.haskell} 125~~~ {.haskell .numberLines}
126main = hakyllWith config $ do 126main = hakyllWith config $ do
127 tags <- buildTags "posts/*" tagTranslation' … 127 tags <- buildTags "posts/*" tagTranslation' …
128 let 128 let