avoid re-absoluting the path
This commit is contained in:
parent
fca3de03e3
commit
7fa8225d80
|
@ -160,8 +160,8 @@ rootedPageLink' = do
|
||||||
if app
|
if app
|
||||||
then do
|
then do
|
||||||
idxf <- use indexFile
|
idxf <- use indexFile
|
||||||
pure $ \x -> ub </> x </> idxf
|
pure $ \x -> ub </> unAbsolute x </> idxf
|
||||||
else pure (ub </>)
|
else pure $ (ub </>) . unAbsolute
|
||||||
|
|
||||||
-- | Transform a link to page to a full rooted URL
|
-- | Transform a link to page to a full rooted URL
|
||||||
rootedPageLink :: FilePath -> Site FilePath
|
rootedPageLink :: FilePath -> Site FilePath
|
||||||
|
@ -171,7 +171,7 @@ rootedPageLink = (<*>) rootedPageLink' . pure
|
||||||
rootedLink' :: Site (FilePath -> FilePath)
|
rootedLink' :: Site (FilePath -> FilePath)
|
||||||
rootedLink' = do
|
rootedLink' = do
|
||||||
ub <- use urlBase
|
ub <- use urlBase
|
||||||
pure (ub </>)
|
pure $ (ub </>) . unAbsolute
|
||||||
|
|
||||||
-- | Transform a link to file to a rooted URL.
|
-- | Transform a link to file to a rooted URL.
|
||||||
rootedLink :: FilePath -> Site FilePath
|
rootedLink :: FilePath -> Site FilePath
|
||||||
|
|
Loading…
Reference in a new issue