From f0eaf46755e04b806e2df07a2fabd4060a72d54c Mon Sep 17 00:00:00 2001 From: grm Date: Sat, 12 Sep 2026 11:43:14 +0300 Subject: Serve the superadmin's blog on the root domain The base domain (and www.) now serves a regular blog owned by the first superadmin, created automatically on startup, alongside the management routes. Literal management paths take precedence over the blog's page wildcards, and the slugs they would shadow are reserved. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/config/config.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/config') 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() } -- cgit v1.2.3