|
|
|
@ -66,6 +66,11 @@ func (a *api) tplFuncs() template.FuncMap { |
|
|
|
|
path = filepath.Join("static", path) |
|
|
|
|
return a.blogURL(path, false) |
|
|
|
|
}, |
|
|
|
|
"StaticInlineCSS": func(path string) (template.CSS, error) { |
|
|
|
|
path = filepath.Join("static", path) |
|
|
|
|
b, err := staticFS.ReadFile(path) |
|
|
|
|
return template.CSS(b), err |
|
|
|
|
}, |
|
|
|
|
"AssetURL": func(id string) string { |
|
|
|
|
path := filepath.Join("assets", id) |
|
|
|
|
return a.blogURL(path, false) |
|
|
|
|