HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Web.Html.RelativizeUrls

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" />
  • 2 values
  • Packagehakyll-4.17.0.0
  • Exports2
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceRelativizeUrls.hs