From 08a3fb8a2b0281c3c329b33215ec7f8866add606 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Mon, 14 Jul 2025 01:24:40 +0100 Subject: Add authentication and ability to change host --- pkg/site/site.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/site/site.go') 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" -- cgit v1.2.3-70-g09d2