Display lebd version info in the footer next to the license info
This commit is contained in:
parent
8c3a562c7d
commit
062dd10b99
7 changed files with 23 additions and 2 deletions
|
@ -20,6 +20,11 @@ import Yesod.Default.Util (addStaticContentExternal)
|
|||
import Yesod.Core.Types (Logger)
|
||||
import qualified Yesod.Core.Unsafe as Unsafe
|
||||
|
||||
import Development.GitRev (gitBranch)
|
||||
|
||||
appVersion :: Text
|
||||
appVersion = $(gitBranch)
|
||||
|
||||
-- | The foundation datatype for your application. This can be a good place to
|
||||
-- keep settings and values requiring initialization before your application
|
||||
-- starts running, such as database connections. Every handler will have
|
||||
|
|
|
@ -64,6 +64,10 @@ data AppSettings = AppSettings
|
|||
-- ^ Google Analytics code
|
||||
, appTitle :: Maybe Text
|
||||
-- ^ Site-wide title.
|
||||
, appName :: Text
|
||||
-- ^ Name of application used to generate site.
|
||||
, appRepository :: Text
|
||||
-- ^ URL of repository for application source.
|
||||
|
||||
, appAuthDummyLogin :: Bool
|
||||
-- ^ Indicate if auth dummy login should be enabled.
|
||||
|
@ -94,6 +98,8 @@ instance FromJSON AppSettings where
|
|||
|
||||
appAnalytics <- o .:? "analytics"
|
||||
appTitle <- o .:? "title"
|
||||
appName <- o .: "app-name"
|
||||
appRepository <- o .: "repository"
|
||||
|
||||
-- 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue