hakyll-3.2.6.1: A static website compiler library

Safe HaskellSafe-Infered

Hakyll.Web.Urls

Description

Provides utilities to manipulate URL's

Synopsis

Documentation

withUrls :: (String -> String) -> String -> StringSource

Apply a function to each URL on a webpage

toUrl :: FilePath -> StringSource

Convert a filepath to an URL starting from the site root

Example:

 toUrl "foo/bar.html"

Result:

 "/foo/bar.html"

toSiteRoot :: String -> StringSource

Get the relative url to the site root, for a given (absolute) url

isExternal :: String -> BoolSource

Check if an URL links to an external HTTP(S) source