mathiassm
Safe HaskellNone
LanguageGHC2024

MathiasSM.Yaml.Website

Description

The site configuration read from website.yaml in the content repo

Synopsis

Main logic

loadWebsite :: FilePath -> IO Website Source #

Reads and parses contentDir/website.yaml, failing with a clear message

validateSecurityExpiration :: Website -> IO () Source #

Fails if the security.txt expiration is within the configured margin (or already passed)

website.yaml parsing

website:

site:

data Site Source #

The site: section: the site's identity

Instances

Instances details
FromJSON Site Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Site Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

showsPrec :: Int -> Site -> ShowS #

show :: Site -> String #

showList :: [Site] -> ShowS #

Eq Site Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

contact:

data Contact Source #

The contact: section: how to reach the site owner

Constructors

Contact 

Instances

Instances details
FromJSON Contact Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Contact Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Contact Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

manifest:

data Manifest Source #

The manifest: section: web app manifest colours

Instances

Instances details
FromJSON Manifest Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Manifest Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Manifest Source # 
Instance details

Defined in MathiasSM.Yaml.Website

mathjax:

data Mathjax Source #

The mathjax: section: which MathJax CDN version renders the site's math

Constructors

Mathjax 

Instances

Instances details
FromJSON Mathjax Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Mathjax Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Mathjax Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

highlight:

data Highlight Source #

The highlight: section: which pandoc style renders code blocks

Constructors

Highlight 

Instances

Instances details
FromJSON Highlight Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Highlight Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Highlight Source # 
Instance details

Defined in MathiasSM.Yaml.Website

highlightStyleName :: HighlightStyle -> String Source #

How a highlight style is spelled

parseHighlightStyle :: String -> Maybe HighlightStyle Source #

Resolves a HighlightStyle from its highlight.style spelling, if known

feed:

data FeedConfig Source #

The feed: section: data behind atom.xml files

Constructors

FeedConfig 

Fields

security:

data Security Source #

The security: section: data behind .well-known/security.txt

Instances

Instances details
FromJSON Security Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Security Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Security Source # 
Instance details

Defined in MathiasSM.Yaml.Website

robots:

data Robots Source #

The robots: section: data behind robots.txt

Constructors

Robots 

Fields

Instances

Instances details
FromJSON Robots Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Robots Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Robots Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

trust:

data Trust Source #

The trust: section: data behind .well-known/trust.txt

Constructors

Trust 

Instances

Instances details
FromJSON Trust Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Trust Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

showsPrec :: Int -> Trust -> ShowS #

show :: Trust -> String #

showList :: [Trust] -> ShowS #

Eq Trust Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

funding:

data Funding Source #

The funding: section: data behind funding.json

Instances

Instances details
FromJSON Funding Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Show Funding Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Eq Funding Source # 
Instance details

Defined in MathiasSM.Yaml.Website

Methods

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

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

data FundingEntity Source #

The entity being funded (the funding.entity section)