1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-21 03:27:01 +00:00

Add customizable greeting to index page

Allow an organization to copy the greeting.html file out of the themes
directory, customize it, then point the greeting.file config option at
it so that it will survive Inbucket upgrades.
This commit is contained in:
James Hillyerd
2013-10-10 14:04:22 -07:00
parent dcc5d240cb
commit 97a2016177
8 changed files with 43 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ type SmtpConfig struct {
type Pop3Config struct {
Ip4address net.IP
Ip4port int
Domain string
Domain string
MaxIdleSeconds int
}
@@ -35,6 +35,7 @@ type WebConfig struct {
TemplateDir string
TemplateCache bool
PublicDir string
GreetingFile string
}
type DataStoreConfig struct {
@@ -328,6 +329,13 @@ func parseWebConfig() error {
}
webConfig.PublicDir = str
option = "greeting.file"
str, err = Config.String(section, option)
if err != nil {
return fmt.Errorf("Failed to parse [%v]%v: '%v'", section, option, err)
}
webConfig.GreetingFile = str
return nil
}