mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05: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() bool
|
||||
|
||||
// LanguagePrefi returns the language prefix for this site.
|
||||
LanguagePrefix() string
|
||||
}
|
||||
|
||||
// Sites represents an ordered list of sites (languages).
|
||||
|
@ -292,6 +295,10 @@ func (s *siteWrapper) DisqusShortname() string {
|
|||
return s.s.DisqusShortname()
|
||||
}
|
||||
|
||||
func (s *siteWrapper) LanguagePrefix() string {
|
||||
return s.s.LanguagePrefix()
|
||||
}
|
||||
|
||||
type testSite struct {
|
||||
h hugo.HugoInfo
|
||||
l *langs.Language
|
||||
|
@ -348,6 +355,10 @@ func (t testSite) Current() Site {
|
|||
return t
|
||||
}
|
||||
|
||||
func (s testSite) LanguagePrefix() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (t testSite) Languages() langs.Languages {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue