mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
				
					committed by
					
						
						Bjørn Erik Pedersen
					
				
			
			
				
	
			
			
			
						parent
						
							9891c0fb0e
						
					
				
				
					commit
					81c13171a9
				
			@@ -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))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user