summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2025-01-14 11:48:09 -0600
committerChris Wells <chris@mathematicaster.org>2025-01-14 11:48:09 -0600
commitdae3dca29075d5de8c4c51b3eab9bf0334866c9a (patch)
treed30e1f3186330ca5750df70aefb5050d0105d18b /src/Hakyll/Web
parent1a3ecbb58d85f70be0625777f9deb9a58907d2e2 (diff)
downloadmain-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar.gz
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar.bz2
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar.lz
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar.xz
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.tar.zst
main-dae3dca29075d5de8c4c51b3eab9bf0334866c9a.zip
Adding new modules
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/Template/Util.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Hakyll/Web/Template/Util.hs b/src/Hakyll/Web/Template/Util.hs
new file mode 100644
index 0000000..cfd8573
--- /dev/null
+++ b/src/Hakyll/Web/Template/Util.hs
@@ -0,0 +1,11 @@
+module Hakyll.Web.Template.Util
+ ( slug
+ ) where
+
+import Prolog
+import Hakyll.Web.Template.Context
+import Data.String.Slugger
+
+
+slug :: Context a
+slug = functionField "slug" $ \strs _ -> pure $ toSlug $ unwords strs