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

View File

@ -1,6 +1,5 @@
---
title: getpage
linktitle: GetPage
title: .GetPage
description: Looks up the index page (`_index.md`) of a given `Kind` and `path`.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: numfmt
linktitle: NumFmt
title: lang.NumFmt
description: "Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters."
godocref: ""
workson: []
@ -13,8 +12,7 @@ menu:
docs:
parent: "functions"
toc: false
ns: "lang"
signature: ["NumFmt <decimal> <grouping> <negative> <precision> <number>"]
signature: ["lang.NumFmt <decimal> <grouping> <negative> <precision> <number>"]
workson: []
hugoversion:
relatedfuncs: []

View File

@ -1,6 +1,5 @@
---
title: abslangurl
linktitle: absLangURL
title: absLangURL
description: Adds the absolute URL with correct language prefix according to site configuration for multilingual.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: absurl
linktitle: absURL
title: absURL
description: Given a string, prepends the full absolute URL according to position in file structure and the configured baseURL.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: adddate
linktitle: AddDate
title: .AddDate
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
date: 2017-02-01
@ -11,7 +10,7 @@ menu:
docs:
parent: "functions"
#tags: [dates,time]
signature: ["AddDate YEARS MONTHS DAYS"]
signature: [".AddDate YEARS MONTHS DAYS"]
workson: [times]
hugoversion:
relatedfuncs: [now]

View File

@ -1,6 +1,5 @@
---
title: after
linktitle: after
description: Slices an array to only the items after the Nth item.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: apply
linktitle: apply
description: Given a map, array, or slice, `description` returns a new slice with a function applied over it.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: base64
linktitle: base64
description: base64Encode and base64Decode let you easily decode content with a base64 encoding and vice versa through pipes.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: chomp
linktitle: chomp
description: Removes any trailing newline characters.
godocref: Removes any trailing newline characters.
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: countrunes
linktitle: countrunes
description: Determines the number of runes in a string and excludes any whitespace.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: countwords
linktitle: countwords
description: Counts the number of words in a string that has been passed to it.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: dateFormat
linktitle:
description: Converts the textual representation of the `datetime` into the specified format.
godocref: https://golang.org/pkg/time/
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: default
linktitle: default
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."
godocref:

View File

@ -1,6 +1,5 @@
---
title: delimit
linktitle: delimit
description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
godocref:
workson: []

View File

@ -1,6 +1,5 @@
---
title: dict
linktitle: dict
description: Creates a dictionary `(map[string, interface{})` that expects parameters added in a value:object fashion.
godocref:
workson: []

View File

@ -1,6 +1,5 @@
---
title: echoparam
linktitle: echoParam
title: echoParam
description: Prints a parameter if it is set.
godocref:
date: 2017-02-01
@ -20,6 +19,7 @@ draft: false
aliases: []
---
`echoParam` prints a parameter if it is set.
```

View File

@ -1,6 +1,5 @@
---
title: emojify
linktitle:
description: Runs a string through the Emoji emoticons processor.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: findre
linktitle: findRE
title: findRE
description: Returns a list of strings that match the regular expression.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: format
linktitle: Format
title: .Format
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
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: get
linktitle: Get
title: .Get
description: Accesses positional and ordered parameters in shortcode declaration.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: getenv
linktitle: getenv
description: Returns the value of an environment variable.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: haschildren
linktitle: HasChildren
title: .HasChildren
description:
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: hasmenucurrent
linktitle: HasMenuCurrent
title: .HasMenuCurrent
description:
godocref:
date: 2017-02-01

View File

@ -1,5 +1,5 @@
---
title: ismenucurrent
title: .IsMenuCurrent
linktitle: IsMenuCurrent
description:
godocref:

View File

@ -1,6 +1,5 @@
---
title: math
linktitle: Math
title: Math
description: Hugo provides six mathematical operators in templates.
godocref:
date: 2017-02-01

View File

@ -1,6 +1,5 @@
---
title: param
linktitle: Param
title: .Param
description: Calls page or site variables into your template.
godocref:
date: 2017-02-01
@ -12,7 +11,7 @@ menu:
docs:
parent: "functions"
toc:
signature: ["Param KEY"]
signature: [".Param KEY"]
workson: []
hugoversion:
relatedfuncs: [default]

View File

@ -1,5 +1,5 @@
---
title: Scratch
title: .Scratch
description: Acts as a "scratchpad" to allow for writable page- or shortcode-scoped variables.
godocref:
date: 2017-02-01

View File

@ -1,9 +1,6 @@
---
title: unix
# Set this to draft for now; "unix" is not a function. We need to redo this section with:
# - methods vs functions
# - function namespaces as subsections.
draft: true
title: .Unix
draft: false
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
date: 2017-02-01