diff --git a/resources/page/site.go b/resources/page/site.go index 899042391..aff7e86fe 100644 --- a/resources/page/site.go +++ b/resources/page/site.go @@ -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 }