diff options
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 4972178..7a3a79c 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -53,8 +53,15 @@ func Load() (*Config, error) { return c, nil } +// RootSubdomain is the pseudo-subdomain of the blog served on the base domain +// itself (and on www.). It is owned by the superadmin. +const RootSubdomain = "www" + // BlogURL returns the public URL for a blog subdomain. func (c *Config) BlogURL(sub string) string { + if sub == RootSubdomain { + return c.RootURL() + } return "http://" + sub + "." + c.HostWithPort() } |
