mirror of https://github.com/jlelse/GoBlog
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
398 B
Go
20 lines
398 B
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
|
|
ts "git.jlel.se/jlelse/template-strings"
|
|
)
|
|
|
|
//go:embed strings/*
|
|
var stringsFiles embed.FS
|
|
|
|
func (a *goBlog) initTemplateStrings() (err error) {
|
|
blogLangs := make([]string, 0)
|
|
for _, b := range a.cfg.Blogs {
|
|
blogLangs = append(blogLangs, b.Lang)
|
|
}
|
|
a.ts, err = ts.InitTemplateStringsFS(stringsFiles, "strings", ".yaml", "default", blogLangs...)
|
|
return err
|
|
}
|