| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
MathiasSM.Config
Description
Site-wide configuration: identity, where content lives, what groups exist, shared templates
Synopsis
- siteConfiguration :: Configuration
- data SiteConfig = SiteConfig {
- siteName :: String
- siteDescription :: String
- siteAuthor :: String
- siteCopyrightYear :: Int
- siteDomain :: String
- twitterHandle :: String
- mathjaxVersion :: String
- highlightStyle :: HighlightStyle
- contentDir :: FilePath
- assetsDir :: FilePath
- templatesDir :: FilePath
- contentTemplatesDir :: FilePath
- contentCssDir :: FilePath
- contentTemplateNames :: [FilePath]
- siteEnv :: Env
- data Env
- baseUrl :: SiteConfig -> String
- requiredContent :: SiteConfig -> [FilePath]
- mediaDir :: SiteConfig -> FilePath
- projectsGroup :: String
- postSnapshot :: String -> Snapshot
- writingsPattern :: SiteConfig -> Pattern
- pagesPattern :: SiteConfig -> String -> Pattern
- postsPattern :: SiteConfig -> String -> Pattern
- projectsPattern :: SiteConfig -> Pattern
- socialsPattern :: SiteConfig -> Pattern
- dataPattern :: SiteConfig -> Pattern
- dataSchemaPattern :: SiteConfig -> Pattern
- templatePattern :: SiteConfig -> Pattern
- contentCssPattern :: SiteConfig -> Pattern
- dataDir :: SiteConfig -> FilePath
- siteTemplate :: SiteConfig -> Identifier
- minimalTemplate :: SiteConfig -> Identifier
- pageTemplate :: SiteConfig -> Identifier
- postTemplate :: SiteConfig -> Identifier
- resolveTemplate :: SiteConfig -> FilePath -> Identifier
- socialsFile :: SiteConfig -> Identifier
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
| |
The build environment: Dev also publishes the preview pages under example
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