Simple blogging system written in Go https://goblog.app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
GoBlog/templateStrings.go

19 lines
398 B

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
}