Prefix methods with a "."

Not optimal, but it at least indicates that they need a context (Page etc.) and cannot be called alone.
This commit is contained in:
Bjørn Erik Pedersen
2017-07-16 15:32:31 +02:00
parent 4e0bca2b1e
commit b9bdfd40a6
28 changed files with 21 additions and 49 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: getpage title: .GetPage
linktitle: GetPage
description: Looks up the index page (`_index.md`) of a given `Kind` and `path`. description: Looks up the index page (`_index.md`) of a given `Kind` and `path`.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+2 -4
View File
@@ -1,6 +1,5 @@
--- ---
title: numfmt title: lang.NumFmt
linktitle: NumFmt
description: "Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters." description: "Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters."
godocref: "" godocref: ""
workson: [] workson: []
@@ -13,8 +12,7 @@ menu:
docs: docs:
parent: "functions" parent: "functions"
toc: false toc: false
ns: "lang" signature: ["lang.NumFmt <decimal> <grouping> <negative> <precision> <number>"]
signature: ["NumFmt <decimal> <grouping> <negative> <precision> <number>"]
workson: [] workson: []
hugoversion: hugoversion:
relatedfuncs: [] relatedfuncs: []
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: abslangurl title: absLangURL
linktitle: absLangURL
description: Adds the absolute URL with correct language prefix according to site configuration for multilingual. description: Adds the absolute URL with correct language prefix according to site configuration for multilingual.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: absurl title: absURL
linktitle: absURL
description: Given a string, prepends the full absolute URL according to position in file structure and the configured baseURL. description: Given a string, prepends the full absolute URL according to position in file structure and the configured baseURL.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+2 -3
View File
@@ -1,6 +1,5 @@
--- ---
title: adddate title: .AddDate
linktitle: AddDate
description: Returns the time corresponding to adding the given number of years, months, and days passed to the function. description: Returns the time corresponding to adding the given number of years, months, and days passed to the function.
godocref: https://golang.org/pkg/time/#Time.AddDate godocref: https://golang.org/pkg/time/#Time.AddDate
date: 2017-02-01 date: 2017-02-01
@@ -11,7 +10,7 @@ menu:
docs: docs:
parent: "functions" parent: "functions"
#tags: [dates,time] #tags: [dates,time]
signature: ["AddDate YEARS MONTHS DAYS"] signature: [".AddDate YEARS MONTHS DAYS"]
workson: [times] workson: [times]
hugoversion: hugoversion:
relatedfuncs: [now] relatedfuncs: [now]
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: after title: after
linktitle: after
description: Slices an array to only the items after the Nth item. description: Slices an array to only the items after the Nth item.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: apply title: apply
linktitle: apply
description: Given a map, array, or slice, `description` returns a new slice with a function applied over it. description: Given a map, array, or slice, `description` returns a new slice with a function applied over it.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: base64 title: base64
linktitle: base64
description: base64Encode and base64Decode let you easily decode content with a base64 encoding and vice versa through pipes. description: base64Encode and base64Decode let you easily decode content with a base64 encoding and vice versa through pipes.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: chomp title: chomp
linktitle: chomp
description: Removes any trailing newline characters. description: Removes any trailing newline characters.
godocref: Removes any trailing newline characters. godocref: Removes any trailing newline characters.
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: countrunes title: countrunes
linktitle: countrunes
description: Determines the number of runes in a string and excludes any whitespace. description: Determines the number of runes in a string and excludes any whitespace.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: countwords title: countwords
linktitle: countwords
description: Counts the number of words in a string that has been passed to it. description: Counts the number of words in a string that has been passed to it.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: dateFormat title: dateFormat
linktitle:
description: Converts the textual representation of the `datetime` into the specified format. description: Converts the textual representation of the `datetime` into the specified format.
godocref: https://golang.org/pkg/time/ godocref: https://golang.org/pkg/time/
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: default title: default
linktitle: default
description: Allows setting a default value that can be returned if a first value is not set. description: Allows setting a default value that can be returned if a first value is not set.
qref: "Returns a default value if a value is not set when checked." qref: "Returns a default value if a value is not set when checked."
godocref: godocref:
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: delimit title: delimit
linktitle: delimit
description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter. description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
godocref: godocref:
workson: [] workson: []
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: dict title: dict
linktitle: dict
description: Creates a dictionary `(map[string, interface{})` that expects parameters added in a value:object fashion. description: Creates a dictionary `(map[string, interface{})` that expects parameters added in a value:object fashion.
godocref: godocref:
workson: [] workson: []
+2 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: echoparam title: echoParam
linktitle: echoParam
description: Prints a parameter if it is set. description: Prints a parameter if it is set.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
@@ -20,6 +19,7 @@ draft: false
aliases: [] aliases: []
--- ---
`echoParam` prints a parameter if it is set. `echoParam` prints a parameter if it is set.
``` ```
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: emojify title: emojify
linktitle:
description: Runs a string through the Emoji emoticons processor. description: Runs a string through the Emoji emoticons processor.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: findre title: findRE
linktitle: findRE
description: Returns a list of strings that match the regular expression. description: Returns a list of strings that match the regular expression.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: format title: .Format
linktitle: Format
description: Formats built-in Hugo dates---`.Date`, `.PublishDate`, and `.LastMod`---according to Go's layout string. description: Formats built-in Hugo dates---`.Date`, `.PublishDate`, and `.LastMod`---according to Go's layout string.
godocref: https://golang.org/pkg/time/#example_Time_Format godocref: https://golang.org/pkg/time/#example_Time_Format
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: get title: .Get
linktitle: Get
description: Accesses positional and ordered parameters in shortcode declaration. description: Accesses positional and ordered parameters in shortcode declaration.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
-1
View File
@@ -1,6 +1,5 @@
--- ---
title: getenv title: getenv
linktitle: getenv
description: Returns the value of an environment variable. description: Returns the value of an environment variable.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: haschildren title: .HasChildren
linktitle: HasChildren
description: description:
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: hasmenucurrent title: .HasMenuCurrent
linktitle: HasMenuCurrent
description: description:
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
title: ismenucurrent title: .IsMenuCurrent
linktitle: IsMenuCurrent linktitle: IsMenuCurrent
description: description:
godocref: godocref:
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
title: math title: Math
linktitle: Math
description: Hugo provides six mathematical operators in templates. description: Hugo provides six mathematical operators in templates.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+2 -3
View File
@@ -1,6 +1,5 @@
--- ---
title: param title: .Param
linktitle: Param
description: Calls page or site variables into your template. description: Calls page or site variables into your template.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
@@ -12,7 +11,7 @@ menu:
docs: docs:
parent: "functions" parent: "functions"
toc: toc:
signature: ["Param KEY"] signature: [".Param KEY"]
workson: [] workson: []
hugoversion: hugoversion:
relatedfuncs: [default] relatedfuncs: [default]
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
title: Scratch title: .Scratch
description: Acts as a "scratchpad" to allow for writable page- or shortcode-scoped variables. description: Acts as a "scratchpad" to allow for writable page- or shortcode-scoped variables.
godocref: godocref:
date: 2017-02-01 date: 2017-02-01
+2 -5
View File
@@ -1,9 +1,6 @@
--- ---
title: unix title: .Unix
# Set this to draft for now; "unix" is not a function. We need to redo this section with: draft: false
# - methods vs functions
# - function namespaces as subsections.
draft: true
description: Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC. description: Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC.
godocref: https://golang.org/search?q=Unix#Functions godocref: https://golang.org/search?q=Unix#Functions
date: 2017-02-01 date: 2017-02-01