| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
MathiasSM.CleanURL
Synopsis
- outputPath :: FilePath -> FilePath
- pathRoute :: Metadata -> Routes
- cleanIndex :: String -> String
- cleanIndexUrls :: Item String -> Compiler (Item String)
- cleanIndexHtmls :: Item String -> Compiler (Item String)
Documentation
outputPath :: FilePath -> FilePath #
The output file for a public path: `contact` becomes `contactindex.html`, while a path with an extension (like `/404.html`) is kept as is.
pathRoute :: Metadata -> Routes #
Route from the `path:` front matter, laid out by outputPath
cleanIndex :: String -> String #
Strips a URL of its index.html suffix
cleanIndexUrls :: Item String -> Compiler (Item String) #
Cleans all URLs
cleanIndexHtmls :: Item String -> Compiler (Item String) #
Cleans all instances of /index, that might not be a recognized as a URL