diff options
| author | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 17:55:37 +0200 |
|---|---|---|
| committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 17:55:37 +0200 |
| commit | afbc784dc0733bc5d0ff243e2ae9b9e5a8613f69 (patch) | |
| tree | 1bb2adc0675b2229691f56b262a8e8f0271d1979 | |
| parent | b810fe38cf2eddb67b8fa9e56434ce5dbde4f22e (diff) | |
| download | hakyll-afbc784dc0733bc5d0ff243e2ae9b9e5a8613f69.tar.gz | |
Add functionField external tutorial
| -rw-r--r-- | src/Data/Yaml/Extended.hs | 7 | ||||
| -rw-r--r-- | web/tutorials/04-compilers.markdown | 2 | ||||
| -rw-r--r-- | web/tutorials/external-functionfield.md | 6 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/Data/Yaml/Extended.hs b/src/Data/Yaml/Extended.hs index 9ad05f3..099e945 100644 --- a/src/Data/Yaml/Extended.hs +++ b/src/Data/Yaml/Extended.hs @@ -9,8 +9,11 @@ import qualified Data.Vector as V import Data.Yaml toString :: Value -> Maybe String -toString (String t) = Just (T.unpack t) -toString _ = Nothing +toString (String t) = Just (T.unpack t) +toString (Bool True) = Just "true" +toString (Bool False) = Just "false" +toString (Number d) = Just (show d) +toString _ = Nothing toList :: Value -> Maybe [Value] toList (Array a) = Just (V.toList a) diff --git a/web/tutorials/04-compilers.markdown b/web/tutorials/04-compilers.markdown index 4679bb6..a9423dc 100644 --- a/web/tutorials/04-compilers.markdown +++ b/web/tutorials/04-compilers.markdown @@ -1,5 +1,5 @@ --- -title: More on compilers: load, and templates +title: 'More on compilers: load, and templates' author: Jasper Van der Jeugt --- diff --git a/web/tutorials/external-functionfield.md b/web/tutorials/external-functionfield.md new file mode 100644 index 0000000..91df254 --- /dev/null +++ b/web/tutorials/external-functionfield.md @@ -0,0 +1,6 @@ +--- +title: Hakyll's functionField +author: Beerend Lauwers +url: http://beerendlauwers.be/posts/2015-09-21-hakylls-functionfield.html +external: true +--- |
