summaryrefslogtreecommitdiffstats
path: root/create
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 17:35:06 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 17:35:06 +0200
commitab02594e09c0414124186e42d67d52d474dd341a (patch)
tree11d63d0f8d95d04d8f19158d68caf6e8685656bf /create
parentc71f201fd93287afa7cb7b875bd523c25e48400c (diff)
create: Provide the correct .Site object to archetype templates
Fixes #4732
Diffstat (limited to 'create')
-rw-r--r--create/content_template_handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/create/content_template_handler.go b/create/content_template_handler.go
index e9e7cb62b..17e52cae0 100644
--- a/create/content_template_handler.go
+++ b/create/content_template_handler.go
@@ -42,7 +42,7 @@ type ArchetypeFileData struct {
// used in the archetype template. Also, if this is a multilingual setup,
// this site is the site that best matches the target content file, based
// on the presence of language code in the filename.
- Site *hugolib.Site
+ Site *hugolib.SiteInfo
// Name will in most cases be the same as TranslationBaseName, e.g. "my-post".
// But if that value is "index" (bundles), the Name is instead the owning folder.
@@ -108,7 +108,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, kind, targetPath, archetypeFile
Date: time.Now().Format(time.RFC3339),
Name: name,
File: f,
- Site: s,
+ Site: &s.Info,
}
if archetypeFilename == "" {