aboutsummaryrefslogtreecommitdiff
path: root/reploy.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-10-16 19:00:28 +0200
committerMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-10-16 19:00:28 +0200
commit7fa8225d8063e3b98b98ba007a78c2892ac4f017 (patch)
tree6c7470cca2b8af9d85c4964efd9af04c54584b43 /reploy.hs
parentfca3de03e3b575a9d1390fcc24897e41f5ec5141 (diff)
downloadreploy-7fa8225d8063e3b98b98ba007a78c2892ac4f017.tar.gz
reploy-7fa8225d8063e3b98b98ba007a78c2892ac4f017.tar.bz2
avoid re-absoluting the path
Diffstat (limited to 'reploy.hs')
-rw-r--r--reploy.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/reploy.hs b/reploy.hs
index a244715..c76b04a 100644
--- a/reploy.hs
+++ b/reploy.hs
@@ -160,8 +160,8 @@ rootedPageLink' = do
if app
then do
idxf <- use indexFile
- pure $ \x -> ub </> x </> idxf
- else pure (ub </>)
+ pure $ \x -> ub </> unAbsolute x </> idxf
+ else pure $ (ub </>) . unAbsolute
-- | Transform a link to page to a full rooted URL
rootedPageLink :: FilePath -> Site FilePath
@@ -171,7 +171,7 @@ rootedPageLink = (<*>) rootedPageLink' . pure
rootedLink' :: Site (FilePath -> FilePath)
rootedLink' = do
ub <- use urlBase
- pure (ub </>)
+ pure $ (ub </>) . unAbsolute
-- | Transform a link to file to a rooted URL.
rootedLink :: FilePath -> Site FilePath