summaryrefslogtreecommitdiff
path: root/build/add-math-kleen-org.hs
diff options
context:
space:
mode:
authorViktor Kleen <viktor@kleen.org>2015-01-02 09:29:04 +0000
committerViktor Kleen <viktor@kleen.org>2015-01-02 09:29:04 +0000
commitf7d4ba2023ab18b9d7c5fad85cbb863c61e6272c (patch)
tree7ffe93f3629546f8a0cb4ca7c7c7ce70196e4387 /build/add-math-kleen-org.hs
downloaddirty-haskell.org-f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c.tar
dirty-haskell.org-f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c.tar.gz
dirty-haskell.org-f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c.tar.bz2
dirty-haskell.org-f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c.tar.xz
dirty-haskell.org-f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c.zip
initial commit
Diffstat (limited to 'build/add-math-kleen-org.hs')
-rwxr-xr-xbuild/add-math-kleen-org.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/add-math-kleen-org.hs b/build/add-math-kleen-org.hs
new file mode 100755
index 0000000..e564149
--- /dev/null
+++ b/build/add-math-kleen-org.hs
@@ -0,0 +1,13 @@
1#!/usr/bin/env runhaskell
2
3import Data.Map
4import Text.Pandoc.Pretty
5import Text.Pandoc.JSON
6import System.IO
7
8add_title :: Pandoc -> Pandoc
9add_title (Pandoc m bs) = Pandoc (add_title' m) bs
10 where add_title' m@(Meta map) = Meta $ insert "title" (MetaInlines $ [Link [Str "math.kleen.org:"] ("/","math.kleen.org"), Space] ++ docTitle m) map
11
12main :: IO ()
13main = toJSONFilter add_title