diff options
| author | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-06-08 15:03:11 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-06-08 15:03:11 +0200 |
| commit | dc128cbe0e959bb6ae2abb5d5b81794e8b82d049 (patch) | |
| tree | 58bc3c47ca978b486c6228f57b8c4adb7f543bb6 /site.hs | |
| parent | 384e56cb53b2f75299a5a95970f800f9fcc76909 (diff) | |
| download | reploy-dc128cbe0e959bb6ae2abb5d5b81794e8b82d049.tar.gz reploy-dc128cbe0e959bb6ae2abb5d5b81794e8b82d049.tar.bz2 | |
avoid explosion on people adding abs-path mount
Diffstat (limited to 'site.hs')
| -rw-r--r-- | site.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -66,7 +66,9 @@ loadPage fp = do md <- io $ runIOorExplode $ readMarkdown markdownReadOpts (T.drop 5 markdown) {- find the main mount point for the page -} let mount = - T.unpack . just ("mount point of " ++ fp) $ yml ^? key "mount" . _String + dropWhile (== '/') . T.unpack . just ("mount point of " ++ fp) $ yml ^? + key "mount" . + _String existing <- use $ pages . to (M.!? mount) case existing of Just pi -> |
