From 3d4c21e18e66eb6b2acf96a9c9a1dd41803b9184 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 2 Oct 2017 22:04:20 +1100 Subject: [PATCH] Add a site-wide title --- config/settings.yml | 1 + src/Settings.hs | 3 +++ templates/default-layout.hamlet | 19 +++++++------------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/config/settings.yml b/config/settings.yml index 4c45d29..4db7bea 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -31,4 +31,5 @@ database: database: "_env:MYSQL_DATABASE:lebd" poolsize: "_env:MYSQL_POOLSIZE:10" +title: 00dani.me #analytics: UA-YOURCODE diff --git a/src/Settings.hs b/src/Settings.hs index baa97e7..e1ea0d1 100644 --- a/src/Settings.hs +++ b/src/Settings.hs @@ -62,6 +62,8 @@ data AppSettings = AppSettings -- Example app-specific configuration values. , appAnalytics :: Maybe Text -- ^ Google Analytics code + , appTitle :: Maybe Text + -- ^ Site-wide title. , appAuthDummyLogin :: Bool -- ^ Indicate if auth dummy login should be enabled. @@ -91,6 +93,7 @@ instance FromJSON AppSettings where appSkipCombining <- o .:? "skip-combining" .!= defaultDev appAnalytics <- o .:? "analytics" + appTitle <- o .:? "title" -- This code enables MySQL's strict mode, without which MySQL will truncate data. -- See https://github.com/yesodweb/persistent/wiki/Database-Configuration#strict-mode for details diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index faf4277..23d09d2 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -1,13 +1,14 @@ -