Commit 86b2a27 committed May 17, 2023 Verified
1 parent 35955f5 commit 86b2a27 Copy full SHA for 86b2a27
File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ type Site interface {
133
133
134
134
// IsMultilingual reports whether this site is configured with more than one language.
135
135
IsMultiLingual () bool
136
+
137
+ // LanguagePrefi returns the language prefix for this site.
138
+ LanguagePrefix () string
136
139
}
137
140
138
141
// Sites represents an ordered list of sites (languages).
@@ -292,6 +295,10 @@ func (s *siteWrapper) DisqusShortname() string {
292
295
return s .s .DisqusShortname ()
293
296
}
294
297
298
+ func (s * siteWrapper ) LanguagePrefix () string {
299
+ return s .s .LanguagePrefix ()
300
+ }
301
+
295
302
type testSite struct {
296
303
h hugo.HugoInfo
297
304
l * langs.Language
@@ -348,6 +355,10 @@ func (t testSite) Current() Site {
348
355
return t
349
356
}
350
357
358
+ func (s testSite ) LanguagePrefix () string {
359
+ return ""
360
+ }
361
+
351
362
func (t testSite ) Languages () langs.Languages {
352
363
return nil
353
364
}
You can’t perform that action at this time.
0 commit comments