shithub: hugo

Download patch

ref: 75e55cd06f63bc545c1700cd6904e509fc91093b
parent: e81c06c3f0a6f9a960d91b31960e48a807112655
author: bogem <[email protected]>
date: Mon Nov 21 18:01:42 EST 2016

hugolib, source, tpl: Fix docs

See #2014

--- a/hugolib/pageGroup.go
+++ b/hugolib/pageGroup.go
@@ -227,7 +227,8 @@
 	return r, nil
 }
 
-// GroupByDate groups by the given page's Date value in the given format and with the given order.
+// GroupByDate groups by the given page's Date value in
+// the given format and with the given order.
 // Valid values for order is asc, desc, rev and reverse.
 // For valid format strings, see https://golang.org/pkg/time/#Time.Format
 func (p Pages) GroupByDate(format string, order ...string) (PagesGroup, error) {
@@ -240,7 +241,8 @@
 	return p.groupByDateField(sorter, formatter, order...)
 }
 
-// GroupByPublishDate groups by the given page's PublishDate value in the given format and with the given order.
+// GroupByPublishDate groups by the given page's PublishDate value in
+// the given format and with the given order.
 // Valid values for order is asc, desc, rev and reverse.
 // For valid format strings, see https://golang.org/pkg/time/#Time.Format
 func (p Pages) GroupByPublishDate(format string, order ...string) (PagesGroup, error) {
@@ -253,7 +255,8 @@
 	return p.groupByDateField(sorter, formatter, order...)
 }
 
-// GroupByExpireDate groups by the given page's ExpireDate value in the given format and with the given order.
+// GroupByExpiryDate groups by the given page's ExpireDate value in
+// the given format and with the given order.
 // Valid values for order is asc, desc, rev and reverse.
 // For valid format strings, see https://golang.org/pkg/time/#Time.Format
 func (p Pages) GroupByExpiryDate(format string, order ...string) (PagesGroup, error) {
@@ -266,7 +269,8 @@
 	return p.groupByDateField(sorter, formatter, order...)
 }
 
-// GroupByParamDate groups by a date set as a param on the page in the given format and with the given order.
+// GroupByParamDate groups by a date set as a param on the page in
+// the given format and with the given order.
 // Valid values for order is asc, desc, rev and reverse.
 // For valid format strings, see https://golang.org/pkg/time/#Time.Format
 func (p Pages) GroupByParamDate(key string, format string, order ...string) (PagesGroup, error) {
--- a/source/file.go
+++ b/source/file.go
@@ -54,12 +54,13 @@
 	return helpers.ReaderToBytes(f.Contents)
 }
 
-// BaseFileName Filename without extension.
+// BaseFileName is a filename without extension.
 func (f *File) BaseFileName() string {
 	return f.baseName
 }
 
-// Filename with no extension, not even the optional language extension part.
+// TranslationBaseName is a filename with no extension,
+// not even the optional language extension part.
 func (f *File) TranslationBaseName() string {
 	return f.translationBaseName
 }
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -68,7 +68,7 @@
 	errors []*templateErr
 }
 
-// The "Global" Template System
+// T is the "global" template system
 func T() Template {
 	if tmpl == nil {
 		tmpl = New()