MCPcopy Index your code
hub / github.com/writefreely/writefreely / initUserPage

Function initUserPage

templates.go:105–117  ·  view source on GitHub ↗
(parentDir, path, key string)

Source from the content-addressed store, hash-verified

103}
104
105func initUserPage(parentDir, path, key string) {
106 if debugging {
107 log.Info(" [%s] %s", key, path)
108 }
109
110 userPages[key] = template.Must(template.New(key).Funcs(funcMap).ParseFiles(
111 path,
112 filepath.Join(parentDir, templatesDir, "user", "include", "header.tmpl"),
113 filepath.Join(parentDir, templatesDir, "user", "include", "footer.tmpl"),
114 filepath.Join(parentDir, templatesDir, "user", "include", "silenced.tmpl"),
115 filepath.Join(parentDir, templatesDir, "user", "include", "nav.tmpl"),
116 ))
117}
118
119// InitTemplates loads all template files from the configured parent dir.
120func InitTemplates(cfg *config.Config) error {

Callers 1

InitTemplatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected