broke out a lot of base bits of the frame as configurable options
This commit is contained in:
+9
-2
@@ -59,14 +59,21 @@ func (*AmCLI) Version() string {
|
||||
// AmConfig holds the configuration of the application as read from YAML.
|
||||
type AmConfig struct {
|
||||
Site struct {
|
||||
BaseURL string `yaml:"baseURL"`
|
||||
Title string `yaml:"title"`
|
||||
BaseURL string `yaml:"baseURL"`
|
||||
Title string `yaml:"title"`
|
||||
SiteIcon struct {
|
||||
Path string `yaml:"path"`
|
||||
Type string `yaml:"type"`
|
||||
} `yaml:"siteIcon"`
|
||||
SiteShortcutIcon string `yaml:"siteShortcutIcon"`
|
||||
SiteLogo string `yaml:"siteLogo"`
|
||||
TopRefresh int `yaml:"topRefresh"`
|
||||
LoginCookieName string `yaml:"loginCookieName"`
|
||||
LoginCookieAge int `yaml:"loginCookieAge"`
|
||||
SessionExpire string `yaml:"sessionExpire"`
|
||||
UserAgreementResource string `yaml:"userAgreementResource"`
|
||||
PolicyResource string `yaml:"policyResource"`
|
||||
FooterTemplate string `yaml:"footerTemplate"`
|
||||
} `yaml:"site"`
|
||||
Database struct {
|
||||
Driver string `yaml:"driver"`
|
||||
|
||||
@@ -9,12 +9,18 @@
|
||||
site:
|
||||
baseURL: "http://localhost:1323"
|
||||
title: "Amsterdam Web Communities System"
|
||||
siteIcon:
|
||||
path: "/img/builtin/AmsterdamIcon32.png"
|
||||
type: "image/png"
|
||||
siteShortcutIcon: "/img/builtin/AmsterdamIcon32.ico"
|
||||
siteLogo: "/img/builtin/powered-by-amsterdam.png"
|
||||
topRefresh: 300
|
||||
loginCookieName: AmsterdamAuth
|
||||
loginCookieAge: 365
|
||||
sessionExpire: "3h"
|
||||
userAgreementResource: "useragreement.html"
|
||||
policyResource: "policy.html"
|
||||
footerTemplate: "footer.jet"
|
||||
database:
|
||||
driver: "mysql"
|
||||
dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=UTC"
|
||||
|
||||
Reference in New Issue
Block a user