mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
511d5d3b76
commit
1823c053c8
2 changed files with 8 additions and 1 deletions
|
@ -52,6 +52,9 @@ The following is a list of site-level (aka "global") variables. Many of these va
|
||||||
.Site.IsMultiLingual
|
.Site.IsMultiLingual
|
||||||
: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
|
: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
|
||||||
|
|
||||||
|
.Site.IsServer
|
||||||
|
: a boolean to indicate if the site is being served with Hugo's built-in server. See [`hugo server`](/commands/hugo_server/) for more information.
|
||||||
|
|
||||||
.Site.Language.Lang
|
.Site.Language.Lang
|
||||||
: the language code of the current locale (e.g., `en`).
|
: the language code of the current locale (e.g., `en`).
|
||||||
|
|
||||||
|
|
|
@ -467,6 +467,10 @@ func (s *SiteInfo) IsMultiLingual() bool {
|
||||||
return len(s.Languages) > 1
|
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) {
|
func (s *SiteInfo) refLink(ref string, page *Page, relative bool, outputFormat string) (string, error) {
|
||||||
var refURL *url.URL
|
var refURL *url.URL
|
||||||
var err error
|
var err error
|
||||||
|
|
Loading…
Reference in a new issue