avoid explosion on people adding abs-path mount
This commit is contained in:
parent
384e56cb53
commit
dc128cbe0e
4
site.hs
4
site.hs
|
@ -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 ->
|
||||
|
|
Loading…
Reference in a new issue