summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorRicardo N Feliciano <FelicianoTech@gmail.com>2018-03-30 14:15:22 -0400
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-03-30 20:15:22 +0200
commit1823c053c8900cb6ee53b8e5c02939c7398e34dd (patch)
treeaf9c8054784d00bfc0372c4cdb689535f3331f4b /hugolib
parent511d5d3b7681cb76822098f430ed6862232ca529 (diff)
Add .Site.IsServer
Fixes #4478
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/site.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index c3e2d9cb0..7d67cf218 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -467,6 +467,10 @@ func (s *SiteInfo) IsMultiLingual() bool {
return len(s.Languages) > 1
}
+func (s *SiteInfo) IsServer() bool {
+ return s.owner.running
+}
+
func (s *SiteInfo) refLink(ref string, page *Page, relative bool, outputFormat string) (string, error) {
var refURL *url.URL
var err error