summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web/Util/Url.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-03-07 22:10:07 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-03-07 22:10:07 +0100
commit26b233dd7a84aae10762d06c43b05f000451c542 (patch)
tree48c669356aafd230e9490897a1f8c7b1ca6cdde2 /src/Hakyll/Web/Util/Url.hs
parent29a18d618849d9b1cc06d1aecfef1294d9e00dae (diff)
downloadhakyll-26b233dd7a84aae10762d06c43b05f000451c542.tar.gz
Tag url links should be absolute
Diffstat (limited to 'src/Hakyll/Web/Util/Url.hs')
-rw-r--r--src/Hakyll/Web/Util/Url.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Hakyll/Web/Util/Url.hs b/src/Hakyll/Web/Util/Url.hs
index 54a361e..8a02ef3 100644
--- a/src/Hakyll/Web/Util/Url.hs
+++ b/src/Hakyll/Web/Util/Url.hs
@@ -18,7 +18,8 @@ import System.FilePath (splitPath, takeDirectory, joinPath)
-- > "/foo/bar.html"
--
toUrl :: FilePath -> String
-toUrl = ('/' :)
+toUrl ('/' : xs) = '/' : xs
+toUrl url = '/' : url
-- | Get the relative url to the site root, for a given (absolute) url
--