aboutsummaryrefslogtreecommitdiff
path: root/reploy.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-08-02 13:56:11 +0200
committerMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-08-02 13:56:11 +0200
commit8d2c3c229cc4b3025de70a4892ad99c6be33caa2 (patch)
tree7c8ef7b7bd7c4f5a00ff8ed53f15b20ba77fccfc /reploy.hs
parentd4e1fdeaeb898b1686e5831a15ce6e968e66bd7b (diff)
downloadreploy-8d2c3c229cc4b3025de70a4892ad99c6be33caa2.tar.gz
reploy-8d2c3c229cc4b3025de70a4892ad99c6be33caa2.tar.bz2
fixup some leftovers in link creation
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 e3ec004..7e475df 100644
--- a/reploy.hs
+++ b/reploy.hs
@@ -280,7 +280,8 @@ installPage mount pi = do
{- | Install a simple redirect handler page. -}
installRedirect :: FilePath -> FilePath -> Site ()
-installRedirect target from = do
+installRedirect target' from = do
+ target <- rootPageUrl target'
tname <- use redirectTemplate
templ <- use $ templates . to (M.! fromString tname)
file <- indexFilename from
@@ -298,8 +299,7 @@ installPageRedirects :: FilePath -> PageInfo -> Site ()
installPageRedirects target pi = do
traverse_
(installRedirect target)
- (pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack .
- to unAbsolute)
+ (pi ^.. pageMeta . key "redirects" . values . _String . to T.unpack)
-- | Find the path to the file of a given hash
dataFilename :: String -> FilePath -> Site (FilePath, FilePath)