mathiassm
Safe HaskellNone
LanguageGHC2024

MathiasSM.Config

Description

Site-wide configuration: identity, where content lives, what groups exist, shared templates

Synopsis

Hakyll's Configuration

siteConfiguration :: Configuration Source #

Hakyll's default configuration, except that `.well-known` folders are not ignored (Hakyll skips every dot-folder, but `assetsstatic.well-known/` must be published) TODO: Review if condition is correct, or even needed

Deployment config

data SiteConfig Source #

Build-time site configuration, gathered once from the environment by MathiasSM.Cli. Every field maps to an environment variable; see .env.example

Constructors

SiteConfig 

Fields

data Env Source #

The build environment: Dev also publishes the preview pages under example

Constructors

Dev 
Prod 

Instances

Instances details
Show Env Source # 
Instance details

Defined in MathiasSM.Config

Methods

showsPrec :: Int -> Env -> ShowS #

show :: Env -> String #

showList :: [Env] -> ShowS #

Eq Env Source # 
Instance details

Defined in MathiasSM.Config

Methods

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

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

baseUrl :: SiteConfig -> String Source #

Public origin of the site, without trailing slash

Files

requiredContent :: SiteConfig -> [FilePath] Source #

Files the site cannot build without, relative to the repo root (website.yaml is loaded separately by MathiasSM.Yaml.Website)

mediaDir :: SiteConfig -> FilePath Source #

Where the site's media lives: `branding`, `icons`, `photos` (published at `images`)

projectsGroup :: String Source #

The group whose items are the projects (its index page lists `projects/`)

postSnapshot :: String -> Snapshot Source #

The snapshot holding each published post of a single group, as rendered HTML (before templates)

Patterns for files

writingsPattern :: SiteConfig -> Pattern Source #

Every file under contentDirwritings

pagesPattern :: SiteConfig -> String -> Pattern Source #

A standalone page or group index page (a flat file under contentDirwritings) named name

postsPattern :: SiteConfig -> String -> Pattern Source #

Items of a post group

projectsPattern :: SiteConfig -> Pattern Source #

All showcase projects

socialsPattern :: SiteConfig -> Pattern Source #

The single socials file (a list of accounts)

dataPattern :: SiteConfig -> Pattern Source #

Every generic data file, at any depth under dataDir

dataSchemaPattern :: SiteConfig -> Pattern Source #

The optional JSON Schema for each data file, co-located as name.schema.json

templatePattern :: SiteConfig -> Pattern Source #

Every template the site can use: the vendored defaults plus any content-provided overrides

contentCssPattern :: SiteConfig -> Pattern Source #

Content-provided styles, loaded after the vendored ones

Directories

dataDir :: SiteConfig -> FilePath Source #

Where generic data files (any YAML) live

Identifiers

Templates

siteTemplate :: SiteConfig -> Identifier Source #

Templates every kind of page goes through

minimalTemplate :: SiteConfig -> Identifier Source #

Templates every kind of page goes through

pageTemplate :: SiteConfig -> Identifier Source #

Templates every kind of page goes through

postTemplate :: SiteConfig -> Identifier Source #

Templates every kind of page goes through

resolveTemplate :: SiteConfig -> FilePath -> Identifier Source #

Resolves a template's bare name ("site.html") to the identifier to load: the content-provided override when one exists, else the vendored default.

Data files

socialsFile :: SiteConfig -> Identifier Source #

The data files (YAML) read by contexts