aboutsummaryrefslogtreecommitdiff
path: root/site.hs
diff options
context:
space:
mode:
Diffstat (limited to 'site.hs')
-rw-r--r--site.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/site.hs b/site.hs
index 938ef6d..f91c007 100644
--- a/site.hs
+++ b/site.hs
@@ -3,7 +3,7 @@
-- | The main deployment script.
module Main where
-import Control.Monad ((>=>), unless, when, join)
+import Control.Monad ((>=>), join, unless, when)
import Control.Monad.Extra (whenM)
import Control.Monad.Trans.State.Lazy
import qualified Data.Aeson as AE
@@ -184,12 +184,11 @@ addTOC pi doc meta@(Y.Object meta') =
let go n = do
toc <-
io . runIOorExplode $ writeHtml5String htmlWriteOpts $
- withPandocBlocks
- (pure . toTableOfContents (tocWriteOpts n))
- doc
+ withPandocBlocks (pure . toTableOfContents (tocWriteOpts n)) doc
pure . Y.Object $ KM.insert "toc" (Y.String toc) meta'
in case ( pi ^? pageMeta . key "toc" . _Bool
- , join $ pi ^? pageMeta . key "toc" . _Number . to Data.Scientific.toBoundedInteger) of
+ , join $ pi ^? pageMeta . key "toc" . _Number .
+ to Data.Scientific.toBoundedInteger) of
(Just False, _) -> pure meta
(_, Nothing) -> go (3 :: Int)
(_, Just n) -> go n