port most routes

This commit is contained in:
orangix
2026-01-19 18:57:06 +01:00
parent 04fbc7f5f4
commit cd4a36c9f7
17 changed files with 310 additions and 213 deletions

View File

@@ -8,7 +8,6 @@ import (
"path/filepath"
"strings"
"codeberg.org/rimgo/rimgo/utils"
"github.com/mailgun/raymond/v2"
)
@@ -37,7 +36,12 @@ func Initialize(views fs.FS) {
return nil
}
path = filepath.ToSlash(path)
buf, err := utils.ReadFile(path, views)
file, err := views.Open(path)
if err != nil {
return err
}
defer file.Close()
buf, err := io.ReadAll(file)
if err != nil {
return err
}