aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/mypage/text.md4
-rw-r--r--oldsite.hs (renamed from site.hs)14
-rw-r--r--pagedeploy.cabal11
3 files changed, 25 insertions, 4 deletions
diff --git a/external/mypage/text.md b/external/mypage/text.md
index 14b321c..4dc51cc 100644
--- a/external/mypage/text.md
+++ b/external/mypage/text.md
@@ -19,5 +19,7 @@ this that
## Something else
+![awesome](img/awesome.png)
+
more nonsense
-haha
+haha [linek](/tags/)
diff --git a/site.hs b/oldsite.hs
index 174f229..d587e03 100644
--- a/site.hs
+++ b/oldsite.hs
@@ -62,7 +62,9 @@ extractHTagLinks ident = do
pure (to, htags)
invTags :: [(Identifier, [[String]])] -> [([String], [String])]
-invTags x = map (fmap (map ('/':) . nub . map toFilePath)) $ groupSort [(t, p) | (p, htl) <- x, ht <- htl, t <- inits ht]
+invTags x =
+ map (fmap (map ('/' :) . nub . map toFilePath)) $
+ groupSort [(t, p) | (p, htl) <- x, ht <- htl, t <- inits ht]
makeTag :: [FilePath] -> [String] -> Rules ()
makeTag htag pages =
@@ -72,8 +74,14 @@ makeTag htag pages =
let ctx =
mconcat
[ constField "title" ("Pages tagged " ++ joinPath htag)
- , listField "htags" (field "htag" (return . itemBody)) (traverse makeItem htag)
- , listField "pages" (field "page" (return . itemBody)) (traverse makeItem pages)
+ , listField
+ "htags"
+ (field "htag" (return . itemBody))
+ (traverse makeItem htag)
+ , listField
+ "pages"
+ (field "page" (return . itemBody))
+ (traverse makeItem pages)
, defaultContext
]
makeItem "" >>= loadAndApplyTemplate "templates/tag.html" ctx >>=
diff --git a/pagedeploy.cabal b/pagedeploy.cabal
index 3417a34..e081cda 100644
--- a/pagedeploy.cabal
+++ b/pagedeploy.cabal
@@ -9,5 +9,16 @@ executable site
, hakyll == 4.16.*
, filepath
, extra
+ , transformers
+ , containers
+ , pandoc
+ , pandoc-types
+ , microlens
+ , microlens-th
+ , microlens-mtl
+ , microlens-aeson
+ , data-default
+ , text
+ , yaml
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010