mathiassm
Safe HaskellNone
LanguageGHC2024

MathiasSM.Rules.Redirects

Synopsis

Documentation

processRedirects :: Rules () #

Builds a redirect page for every `aliases:` of every published page and post

Invalid aliases fail the build.

data Entry #

A published page or post, with the old paths that should lead to it

Instances

Instances details
Show Entry # 
Instance details

Defined in MathiasSM.Rules.Redirects

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

Eq Entry # 
Instance details

Defined in MathiasSM.Rules.Redirects

Methods

(==) :: Entry -> Entry -> Bool #

(/=) :: Entry -> Entry -> Bool #

planRedirects :: [Entry] -> Either [String] [(FilePath, FilePath)] #

The redirects to build, as (output file, target path), or every problem found: an alias that is its own path, the path of another page, or claimed twice