summaryrefslogtreecommitdiffhomepage
path: root/create
diff options
context:
space:
mode:
authorJorin Vogel <[email protected]>2017-08-02 14:25:05 +0200
committerBjørn Erik Pedersen <[email protected]>2017-08-03 15:57:51 +0200
commit81c13171a985b89f2af6682dbd1d4b8766cb9af7 (patch)
treedb39d78bbe6da0ea3f3dd3d2f94c7e1571ad8fd6 /create
parent9891c0fb0eb274b8a95b62c40070a87a6e04088c (diff)
downloadhugo-81c13171a985b89f2af6682dbd1d4b8766cb9af7.tar.gz
hugo-81c13171a985b89f2af6682dbd1d4b8766cb9af7.zip
Add some missing doc comments
As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though.
Diffstat (limited to 'create')
-rw-r--r--create/content_template_handler.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/create/content_template_handler.go b/create/content_template_handler.go
index 0be495d15..286184c2b 100644
--- a/create/content_template_handler.go
+++ b/create/content_template_handler.go
@@ -49,6 +49,7 @@ type ArchetypeFileData struct {
}
const (
+ // ArchetypeTemplateTemplate is used as inital template when adding an archetype template.
ArchetypeTemplateTemplate = `---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
@@ -123,7 +124,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, kind, targetPath, archetypeFile
if !bytes.Contains(archetypeContent, []byte("date")) || !bytes.Contains(archetypeContent, []byte("title")) {
// TODO(bep) remove some time in the future.
- s.Log.FEEDBACK.Println(fmt.Sprintf(`WARNING: date and/or title missing from archetype file %q.
+ s.Log.FEEDBACK.Println(fmt.Sprintf(`WARNING: date and/or title missing from archetype file %q.
From Hugo 0.24 this must be provided in the archetype file itself, if needed. Example:
%s
`, archetypeFilename, ArchetypeTemplateTemplate))