mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user