1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

create: Fix archetype regression when no archetype file

Fixes #3626
This commit is contained in:
Bjørn Erik Pedersen
2017-06-22 20:30:01 +02:00
parent 8b620f7a8a
commit e908d955d2
3 changed files with 18 additions and 14 deletions

View File

@@ -48,11 +48,11 @@ type ArchetypeFileData struct {
}
const (
archetypeTemplateTemplate = `+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
+++`
archetypeTemplateTemplate = `---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
---`
)
func executeArcheTypeAsTemplate(s *hugolib.Site, kind, targetPath, archetypeFilename string) ([]byte, error) {