aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/site/site.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/site/site.go')
-rw-r--r--pkg/site/site.go6
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"