Browse Source

Rework to temporarily support themes.

template-theme-rewrite
Benjamin Shelton 10 months ago
parent
commit
52d81bbae3
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      render/loader.go

+ 5
- 1
render/loader.go View File

@ -14,6 +14,10 @@ type Options struct {
// inaccessible to the renderer.
TemplateRoot string
// Path to theme. Themes are isolated template directories that do not
// interact with each other but share a common TemplateRoot.
ThemePath string
// VFS, if set, will configure the target backend with the specified virtual
// file system.
VFS vfs.FileSystem
@ -26,7 +30,7 @@ func New(backend, name string, options *Options) (Renderer, error) {
case "pongo2":
opts := &PongoOptions{}
if options.VFS != nil {
opts.Loaders = []pongo2.TemplateLoader{NewPongoVFSLoader(options.VFS)}
opts.Loaders = []pongo2.TemplateLoader{NewPongoVFSLoader(options)}
}
if !options.MonitorChanges {
opts.DisableReload = true


Loading…
Cancel
Save