🐛 Fixed language.Tag string representation usage
This commit is contained in:
parent
7df2c82882
commit
22047b7487
|
@ -39,7 +39,8 @@ func NewFileSystemPageRepository(rootDir fs.FS) page.Repository {
|
|||
func (repo *fileSystemPageRepository) Get(ctx context.Context, lang language.Tag, p string) (*domain.Page, error) {
|
||||
ext := ".md"
|
||||
if lang != language.Und {
|
||||
ext = "." + lang.String() + ext
|
||||
base, _ := lang.Base()
|
||||
ext = "." + base.String() + ext
|
||||
}
|
||||
|
||||
index := p + ext
|
||||
|
|
|
@ -51,7 +51,8 @@ func NewFileSystemSiteRepository(rootDir fs.FS) site.Repository {
|
|||
func (repo *fileSystemSiteRepository) Get(ctx context.Context, lang language.Tag) (*domain.Site, error) {
|
||||
ext := ".md"
|
||||
if lang != language.Und {
|
||||
ext = "." + lang.String() + ext
|
||||
base, _ := lang.Base()
|
||||
ext = "." + base.String() + ext
|
||||
}
|
||||
|
||||
target := "index" + ext
|
||||
|
|
Loading…
Reference in New Issue