diff options
author | 2021-06-21 19:46:10 +0200 | |
---|---|---|
committer | 2021-06-21 19:46:10 +0200 | |
commit | f9bc305acaaf26bf3c5ef4ae49f7b5a20c9c1dfe (patch) | |
tree | c7312570819f998a51ad79e950baf523ae6426f8 /internal/config/config.go | |
parent | Deletes+unboosts (#52) (diff) | |
download | gotosocial-f9bc305acaaf26bf3c5ef4ae49f7b5a20c9c1dfe.tar.xz |
new styling for frontpage, update login and authorize templates (#46)
* new styling for frontpage, update login and authorize templates
* run go fmt
* add AssetBaseDir to command flag parsing
* untested: move landing page to it's own router
* go fmt, fix typo
* fix package, adapt to proper Route structure
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 8a5e27a0c..b0263b170 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -170,6 +170,11 @@ func (c *Config) ParseCLIFlags(f KeyedFlags) error { c.TemplateConfig.BaseDir = f.String(fn.TemplateBaseDir) } + // template flags + if c.TemplateConfig.AssetBaseDir == "" || f.IsSet(fn.AssetBaseDir) { + c.TemplateConfig.AssetBaseDir = f.String(fn.AssetBaseDir) + } + // accounts flags if f.IsSet(fn.AccountsOpenRegistration) { c.AccountsConfig.OpenRegistration = f.Bool(fn.AccountsOpenRegistration) @@ -283,6 +288,7 @@ type Flags struct { DbDatabase string TemplateBaseDir string + AssetBaseDir string AccountsOpenRegistration string AccountsApprovalRequired string @@ -326,6 +332,7 @@ type Defaults struct { DbDatabase string TemplateBaseDir string + AssetBaseDir string AccountsOpenRegistration bool AccountsRequireApproval bool @@ -371,6 +378,7 @@ func GetFlagNames() Flags { DbDatabase: "db-database", TemplateBaseDir: "template-basedir", + AssetBaseDir: "asset-basedir", AccountsOpenRegistration: "accounts-open-registration", AccountsApprovalRequired: "accounts-approval-required", @@ -417,6 +425,7 @@ func GetEnvNames() Flags { DbDatabase: "GTS_DB_DATABASE", TemplateBaseDir: "GTS_TEMPLATE_BASEDIR", + AssetBaseDir: "GTS_ASSET_BASEDIR", AccountsOpenRegistration: "GTS_ACCOUNTS_OPEN_REGISTRATION", AccountsApprovalRequired: "GTS_ACCOUNTS_APPROVAL_REQUIRED", |