summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-12 20:33:46 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-12 20:33:46 +0100
commit878ca8f3b02e99e736edaf5c7f0ba376ff3fe282 (patch)
treeb4885986b046da5af6312897d90dff23291e14ff /src/Hakyll
parent1e0c875d6efd67bda010573fc8bb935eef2ea225 (diff)
downloadhakyll-878ca8f3b02e99e736edaf5c7f0ba376ff3fe282.tar.gz
Document RelativizeUrls module
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Web/RelativizeUrls.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Hakyll/Web/RelativizeUrls.hs b/src/Hakyll/Web/RelativizeUrls.hs
index 2a3b98f..40a5847 100644
--- a/src/Hakyll/Web/RelativizeUrls.hs
+++ b/src/Hakyll/Web/RelativizeUrls.hs
@@ -1,3 +1,19 @@
+-- | This module exposes a function which can relativize URL's on a webpage.
+--
+-- This means that one can deploy the resulting site on
+-- @http:\/\/example.com\/@, but also on @http:\/\/example.com\/some-folder\/@
+-- without having to change anything (simply copy over the files).
+--
+-- To use it, you should use absolute URL's from the site root everywhere. For
+-- example, use
+--
+-- > <img src="/images/lolcat.png" alt="Funny zomgroflcopter" />
+--
+-- in a blogpost. When running this through the relativize URL's module, this
+-- will result in (suppose your blogpost is located at @\/posts\/foo.html@:
+--
+-- > <img src="../images/lolcat.png" alt="Funny zomgroflcopter" />
+--
module Hakyll.Web.RelativizeUrls
( relativizeUrls
) where