mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-11 08:13:59 +00:00
parent
35955f50e6
commit
86b2a27438
1 changed files with 11 additions and 0 deletions
|
@ -133,6 +133,9 @@ type Site interface {
|
||||||
|
|
||||||
// IsMultilingual reports whether this site is configured with more than one language.
|
// IsMultilingual reports whether this site is configured with more than one language.
|
||||||
IsMultiLingual() bool
|
IsMultiLingual() bool
|
||||||
|
|
||||||
|
// LanguagePrefi returns the language prefix for this site.
|
||||||
|
LanguagePrefix() string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sites represents an ordered list of sites (languages).
|
// Sites represents an ordered list of sites (languages).
|
||||||
|
@ -292,6 +295,10 @@ func (s *siteWrapper) DisqusShortname() string {
|
||||||
return s.s.DisqusShortname()
|
return s.s.DisqusShortname()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *siteWrapper) LanguagePrefix() string {
|
||||||
|
return s.s.LanguagePrefix()
|
||||||
|
}
|
||||||
|
|
||||||
type testSite struct {
|
type testSite struct {
|
||||||
h hugo.HugoInfo
|
h hugo.HugoInfo
|
||||||
l *langs.Language
|
l *langs.Language
|
||||||
|
@ -348,6 +355,10 @@ func (t testSite) Current() Site {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s testSite) LanguagePrefix() string {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (t testSite) Languages() langs.Languages {
|
func (t testSite) Languages() langs.Languages {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue