diff options
| author | Leonardo Bishop <me@leonardobishop.net> | 2025-07-14 01:24:40 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.net> | 2025-07-14 01:24:40 +0100 |
| commit | 08a3fb8a2b0281c3c329b33215ec7f8866add606 (patch) | |
| tree | ff8a5413449ea198bc063bf0099fc025ea49c82b /pkg/site | |
| parent | 684787bcb72aece2aa914597a3bc8788432e66f7 (diff) | |
Add authentication and ability to change host
Diffstat (limited to 'pkg/site')
| -rw-r--r-- | pkg/site/site.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/site/site.go b/pkg/site/site.go index 3daf5e7..704c34d 100644 --- a/pkg/site/site.go +++ b/pkg/site/site.go @@ -133,6 +133,9 @@ func (s *Site) CreateNewVersion() (string, error) { } func (s *Site) EvaluateSiteStatus() string { + if s.SiteConfig.Host == "" { + return "inactive" + } stat, err := os.Stat(s.GetCurrentPath()) if err != nil || !stat.IsDir() { return "inactive" @@ -145,6 +148,9 @@ func (s *Site) EvaluateSiteStatus() string { } func (s *Site) EvaluateSiteStatusReason() string { + if s.SiteConfig.Host == "" { + return "This site is not served by scrapbook" + } stat, err := os.Stat(s.GetCurrentPath()) if err != nil || !stat.IsDir() { return "This site is inacessible because no version is active" |
