From da717759586dec723d6ab224d52099ff69e9f5e0 Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Mon, 27 Mar 2017 15:25:53 -0500 Subject: [PATCH] Add function signatures Fixes rdwatters/hugo-docs-concept#31 --- content/functions/GetPage.md | 4 ++-- content/functions/abslangurl.md | 4 ++-- content/functions/absurl.md | 4 ++-- content/functions/adddate.md | 4 ++-- content/functions/after.md | 4 ++-- content/functions/apply.md | 4 ++-- content/functions/base64.md | 6 +++--- content/functions/chomp.md | 4 ++-- content/functions/countrunes.md | 4 ++-- content/functions/countwords.md | 4 ++-- content/functions/dateformat.md | 2 +- content/functions/default.md | 2 +- content/functions/delimit.md | 4 ++-- content/functions/dict.md | 4 ++-- content/functions/echoparam.md | 4 ++-- content/functions/emojify.md | 4 ++-- content/functions/eq.md | 4 ++-- content/functions/findRe.md | 4 ++-- content/functions/first.md | 2 +- content/functions/format.md | 4 ++-- content/functions/get.md | 2 +- content/functions/getenv.md | 4 ++-- content/functions/hasPrefix.md | 4 ++-- content/functions/haschildren.md | 6 +++--- content/functions/hasmenucurrent.md | 4 ++-- content/functions/highlight.md | 4 ++-- content/functions/htmlEscape.md | 4 ++-- content/functions/htmlUnescape.md | 4 ++-- content/functions/humanize.md | 2 +- content/functions/i18n.md | 4 ++-- content/functions/imageConfig.md | 2 +- content/functions/in.md | 4 ++-- content/functions/index-function.md | 2 +- content/functions/int.md | 4 ++-- content/functions/intersect.md | 4 ++-- content/functions/ismenucurrent.md | 6 +++--- content/functions/isset.md | 2 +- content/functions/jsonify.md | 4 ++-- content/functions/last.md | 2 +- content/functions/lower.md | 2 +- content/functions/markdownify.md | 4 ++-- content/functions/math.md | 2 +- content/functions/md5.md | 2 +- content/functions/now.md | 2 +- content/functions/param.md | 4 ++-- content/functions/partialCached.md | 4 ++-- content/functions/plainify.md | 2 +- content/functions/pluralize.md | 2 +- content/functions/printf.md | 4 ++-- content/functions/querify.md | 4 ++-- content/functions/range.md | 2 +- content/functions/readdir.md | 2 +- content/functions/readfile.md | 4 ++-- content/functions/ref.md | 4 ++-- content/functions/relLangURL.md | 4 ++-- content/functions/relref.md | 4 ++-- content/functions/relurl.md | 4 ++-- content/functions/render.md | 4 ++-- content/functions/replace.md | 2 +- content/functions/replacere.md | 4 ++-- content/functions/safeCSS.md | 2 +- content/functions/safeHTML.md | 4 ++-- content/functions/safeHTMLAttr.md | 2 +- content/functions/safeJS.md | 2 +- content/functions/safeURL.md | 2 +- content/functions/scratch.md | 2 +- content/functions/seq.md | 4 ++-- content/functions/sha.md | 4 ++-- content/functions/shuffle.md | 4 ++-- content/functions/singularize.md | 2 +- content/functions/slice.md | 4 ++-- content/functions/slicestr.md | 2 +- content/functions/split.md | 2 +- content/functions/string.md | 2 +- content/functions/substr.md | 4 ++-- content/functions/time.md | 4 ++-- content/functions/title.md | 2 +- content/functions/trim.md | 4 ++-- content/functions/truncate.md | 4 ++-- content/functions/union.md | 4 ++-- content/functions/unix.md | 6 +++--- content/functions/upper.md | 2 +- content/functions/urlize.md | 4 ++-- content/functions/where.md | 4 ++-- content/functions/with.md | 2 +- themes/hugo-docs-concept/layouts/_default/baseof.html | 2 +- themes/hugo-docs-concept/layouts/_default/single.html | 5 ++++- .../layouts/partials/functions-signature.html | 9 +++++++++ .../layouts/partials/homepage/homepage-header.html | 2 +- 89 files changed, 159 insertions(+), 147 deletions(-) create mode 100644 themes/hugo-docs-concept/layouts/partials/functions-signature.html diff --git a/content/functions/GetPage.md b/content/functions/GetPage.md index 7d8a55b6b..cce960106 100644 --- a/content/functions/GetPage.md +++ b/content/functions/GetPage.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [sections,lists,indexes] ns: -signature: [] +signature: ["GetPage TYPE PATH"] workson: [] hugoversion: relatedfuncs: [] @@ -51,4 +51,4 @@ This code snippet---in the form of a [partial template][partials]---allows you t [partials]: /templates/partials/ -[taxonomy]: /content-management/taxonomies/ \ No newline at end of file +[taxonomy]: /content-management/taxonomies/ diff --git a/content/functions/abslangurl.md b/content/functions/abslangurl.md index 998db01f3..47c547428 100644 --- a/content/functions/abslangurl.md +++ b/content/functions/abslangurl.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [multilingual,i18n,urls] ns: -signature: [] +signature: ["absLangURL INPUT"] workson: [] hugoversion: relatedfuncs: [relLangURL] @@ -25,4 +25,4 @@ So for a site `baseURL` set to `http://yoursite.com/hugo/` and the current lang ```golang {{ "blog/" | absLangURL }} → "http://yoursite.com/hugo/en/blog/" {{ "blog/" | relLangURL }} → "/hugo/en/blog/" -``` \ No newline at end of file +``` diff --git a/content/functions/absurl.md b/content/functions/absurl.md index f0d610eb2..304d4b971 100644 --- a/content/functions/absurl.md +++ b/content/functions/absurl.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [urls] ns: -signature: [] +signature: ["absURL INPUT"] workson: [] hugoversion: relatedfuncs: [relURL] @@ -49,4 +49,4 @@ The above uses the [apply function][] and also exposes how the Go template parse [apply function]: /functions/apply/ [configuration]: /getting-started/configuration/ [jsonld]: https://developers.google.com/search/docs/guides/intro-structured-data -[safejs]: /functions/safejs \ No newline at end of file +[safejs]: /functions/safejs diff --git a/content/functions/adddate.md b/content/functions/adddate.md index 0d816df3c..aadc2b0c4 100644 --- a/content/functions/adddate.md +++ b/content/functions/adddate.md @@ -9,8 +9,8 @@ lastmod: 2017-02-01 categories: [functions] tags: [dates,time] ns: -signature: [] -workson: [] +signature: ["AddDate YEARS MONTHS DAYS"] +workson: [times] hugoversion: relatedfuncs: [now] deprecated: false diff --git a/content/functions/after.md b/content/functions/after.md index de2487586..e4f9a68ad 100644 --- a/content/functions/after.md +++ b/content/functions/after.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [iteration] ns: -signature: [] +signature: ["after INDEX COLLECTION"] workson: [] hugoversion: relatedfuncs: [last,first,seq] @@ -64,4 +64,4 @@ You can use `after` in combination with the [`first` function][] and Hugo's [pow [`first` function]: /functions/first/ [list/section page]: /templates/section-templates/ [lists]: /lists/ -[slice]: /functions/slice/ \ No newline at end of file +[slice]: /functions/slice/ diff --git a/content/functions/apply.md b/content/functions/apply.md index 9327c31d9..8287e5832 100644 --- a/content/functions/apply.md +++ b/content/functions/apply.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [advanced] ns: -signature: [] +signature: ["apply COLLETION FUNCTION [PARAM...]"] workson: [] hugoversion: relatedfuncs: [] @@ -119,4 +119,4 @@ Now in the completed version, you can sort the tags, convert the tags to links w [delimit]: /functions/delimit/ "See documentation for the delimit function" [functions]: /functions/ "See the full list of Hugo functions to see what can be passed as an argument to the apply function." [partials]: /templates/partials/ -[range]: /functions/range/ "Learn the importance of the range function, a fundamental keyword in both Hugo templates and the Go programming language." \ No newline at end of file +[range]: /functions/range/ "Learn the importance of the range function, a fundamental keyword in both Hugo templates and the Go programming language." diff --git a/content/functions/base64.md b/content/functions/base64.md index 3933dbc71..6177f1e16 100644 --- a/content/functions/base64.md +++ b/content/functions/base64.md @@ -1,6 +1,6 @@ --- title: base64 -linktitle: base64 +linktitle: base64Encode and base64Decode description: base64Encode and base64Decode let you easily decode content with a base64 encoding and vice versa through pipes. godocref: date: 2017-02-01 @@ -10,7 +10,7 @@ categories: [functions] tags: [] relatedfuncs: [] ns: -signature: [] +signature: ["base64Decode INPUT", "base64Encode INPUT"] workson: [] hugoversion: deprecated: false @@ -51,4 +51,4 @@ responses from APIs. {{ $resp.content | base64Decode | markdownify }} ``` -The response of the GitHub API contains the base64-encoded version of the [README.md](https://github.com/spf13/hugo/blob/master/README.md) in the Hugo repository. Now we can decode it and parse the Markdown. The final output will look similar to the rendered version on GitHub. \ No newline at end of file +The response of the GitHub API contains the base64-encoded version of the [README.md](https://github.com/spf13/hugo/blob/master/README.md) in the Hugo repository. Now we can decode it and parse the Markdown. The final output will look similar to the rendered version on GitHub. diff --git a/content/functions/chomp.md b/content/functions/chomp.md index 600a66535..a15d44336 100644 --- a/content/functions/chomp.md +++ b/content/functions/chomp.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [trim] ns: -signature: [] +signature: ["chomp INPUT"] workson: [] hugoversion: relatedfuncs: [truncate] @@ -20,4 +20,4 @@ Removes any trailing newline characters. Useful in a pipeline to remove newlines ```golang {{chomp "

Blockhead

\n"}} → "

Blockhead

" -``` \ No newline at end of file +``` diff --git a/content/functions/countrunes.md b/content/functions/countrunes.md index f2205aa5f..c6160d652 100644 --- a/content/functions/countrunes.md +++ b/content/functions/countrunes.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [counting, word count] ns: -signature: [] +signature: ["countrunes INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -24,4 +24,4 @@ In contrast with `countwords` function, which counts every word in a string, the ``` -[pagevars]: /variables/page/ \ No newline at end of file +[pagevars]: /variables/page/ diff --git a/content/functions/countwords.md b/content/functions/countwords.md index 92991e40d..d0148cd20 100644 --- a/content/functions/countwords.md +++ b/content/functions/countwords.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [counting, word count] ns: -signature: [] +signature: ["countwords INPUT"] workson: [] hugoversion: relatedfuncs: [countrunes] @@ -25,4 +25,4 @@ aliases: [/functions/countrunes/,/functions/countwords/] ``` -[pagevars]: /variables/page/ \ No newline at end of file +[pagevars]: /variables/page/ diff --git a/content/functions/dateformat.md b/content/functions/dateformat.md index f0567e22b..187e1cdd5 100644 --- a/content/functions/dateformat.md +++ b/content/functions/dateformat.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [dates,time,strings] ns: -signature: [] +signature: ["dateFormat LAYOUT INPUT"] workson: [] hugoversion: relatedfuncs: [Format,now,Unix,time] diff --git a/content/functions/default.md b/content/functions/default.md index 7556268cd..59183b1ce 100644 --- a/content/functions/default.md +++ b/content/functions/default.md @@ -11,7 +11,7 @@ tags: [defaults] categories: [functions] toc: ns: -signature: [] +signature: ["default DEFAULT INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/delimit.md b/content/functions/delimit.md index bd14b9cac..3c5ffc898 100644 --- a/content/functions/delimit.md +++ b/content/functions/delimit.md @@ -12,7 +12,7 @@ categories: [functions] tags: [iteration] toc: false ns: -signature: [] +signature: ["delimit COLLECTION DELIMIT LAST"] workson: [lists,taxonomies,terms] hugoversion: relatedfuncs: [] @@ -71,4 +71,4 @@ Tags: {{ delimit .Params.tags ", " ", and " }} [lists]: /templates/lists/ [taxonomies]: /templates/taxonomy-templates/#taxonomy-list-templates -[terms]: /templates/taxonomy-templates/#terms-list-templates \ No newline at end of file +[terms]: /templates/taxonomy-templates/#terms-list-templates diff --git a/content/functions/dict.md b/content/functions/dict.md index cf4cc08ca..0a1a735d0 100644 --- a/content/functions/dict.md +++ b/content/functions/dict.md @@ -10,7 +10,7 @@ lastmod: 2017-02-26 categories: [functions] tags: [dictionary] ns: -signature: [] +signature: ["dict KEY VALUE [KEY VALUE]..."] workson: [] hugoversion: relatedfuncs: [] @@ -49,4 +49,4 @@ Important {{.important}} ``` {{% /code %}} -[partials]: /templates/partials/ \ No newline at end of file +[partials]: /templates/partials/ diff --git a/content/functions/echoparam.md b/content/functions/echoparam.md index eb8b4123a..6242107f0 100644 --- a/content/functions/echoparam.md +++ b/content/functions/echoparam.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["echoParam DICTIONARY KEY"] workson: [] hugoversion: relatedfuncs: [] @@ -22,4 +22,4 @@ aliases: [] ``` {{ echoParam .Params "project_url" }} -``` \ No newline at end of file +``` diff --git a/content/functions/emojify.md b/content/functions/emojify.md index fbe037395..c4917d3b5 100644 --- a/content/functions/emojify.md +++ b/content/functions/emojify.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,emojis] ns: -signature: [] +signature: ["emojify INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -32,4 +32,4 @@ I :heart: Hugo! [config]: /getting-started/configuration/ [emojis]: http://www.emoji-cheat-sheet.com/ [sc]: /templates/shortcode-templates/ -[scsource]: https://github.com/spf13/hugo/tree/master/docs/layouts/shortcodes \ No newline at end of file +[scsource]: https://github.com/spf13/hugo/tree/master/docs/layouts/shortcodes diff --git a/content/functions/eq.md b/content/functions/eq.md index 697114431..b21b35d37 100644 --- a/content/functions/eq.md +++ b/content/functions/eq.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [operators,logic] ns: -signature: [] +signature: ["eq ARG1 ARG2"] workson: [] hugoversion: relatedfuncs: [] @@ -21,4 +21,4 @@ aliases: [] ``` {{ if eq .Section "blog" }}current{{ end }} -``` \ No newline at end of file +``` diff --git a/content/functions/findRe.md b/content/functions/findRe.md index a7548ef5e..5d58d5ad0 100644 --- a/content/functions/findRe.md +++ b/content/functions/findRe.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [regex] ns: -signature: [] +signature: ["findRE PATTERN INPUT [LIMIT]"] workson: [] hugoversion: relatedfuncs: [] @@ -60,4 +60,4 @@ The preceding snippet tries to find all second-level headers and generate a list [partials]: /templates/partials/ [`plainify`]: /functions/plainify/ [toc]: /content-management/toc/ -[`urlize`]: /functions/urlize \ No newline at end of file +[`urlize`]: /functions/urlize diff --git a/content/functions/first.md b/content/functions/first.md index 35623749e..029846f6f 100644 --- a/content/functions/first.md +++ b/content/functions/first.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [iteration] ns: -signature: [] +signature: ["first LIMIT COLLECTION"] workson: [lists,taxonomies,terms,groups] hugoversion: relatedfuncs: [after,last] diff --git a/content/functions/format.md b/content/functions/format.md index 5cd3d5766..b1de89f97 100644 --- a/content/functions/format.md +++ b/content/functions/format.md @@ -9,8 +9,8 @@ lastmod: 2017-02-01 categories: [functions] tags: [dates,time] ns: -signature: [] -workson: [] +signature: ["Format FORMAT"] +workson: [times] hugoversion: relatedfuncs: [dateFormat,now,Unix,time] deprecated: false diff --git a/content/functions/get.md b/content/functions/get.md index d3719d7da..9a21fddfd 100644 --- a/content/functions/get.md +++ b/content/functions/get.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [shortcodes] ns: -signature: [] +signature: ["Get INDEX", "Get KEY"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/getenv.md b/content/functions/getenv.md index 0d5cc266e..16f98495e 100644 --- a/content/functions/getenv.md +++ b/content/functions/getenv.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["getenv VARIABLE"] workson: [] hugoversion: relatedfuncs: [] @@ -26,4 +26,4 @@ variable must also be exported in order to be seen by `hugo`. ``` {{ getenv "HOME" }} -``` \ No newline at end of file +``` diff --git a/content/functions/hasPrefix.md b/content/functions/hasPrefix.md index 46bda4e72..7be2cca0c 100644 --- a/content/functions/hasPrefix.md +++ b/content/functions/hasPrefix.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["hasPrefix STRING PREFIX"] workson: [] hugoversion: relatedfuncs: [] @@ -19,4 +19,4 @@ aliases: [] `hasPrefix` tests whether a string begins with prefix. -* `{{ hasPrefix "Hugo" "Hu" }}` → true \ No newline at end of file +* `{{ hasPrefix "Hugo" "Hu" }}` → true diff --git a/content/functions/haschildren.md b/content/functions/haschildren.md index 67e416d67..8974af144 100644 --- a/content/functions/haschildren.md +++ b/content/functions/haschildren.md @@ -10,8 +10,8 @@ categories: [functions] tags: [menus] toc: ns: -signature: [] -workson: [] +signature: ["HasChildren"] +workson: [menus] hugoversion: relatedfuncs: [] deprecated: false @@ -20,4 +20,4 @@ aliases: [] needsexamples: true --- -Used in [menu templates](/templates/menu-templates/). \ No newline at end of file +Used in [menu templates](/templates/menu-templates/). diff --git a/content/functions/hasmenucurrent.md b/content/functions/hasmenucurrent.md index fabec77de..90e7ff20f 100644 --- a/content/functions/hasmenucurrent.md +++ b/content/functions/hasmenucurrent.md @@ -9,8 +9,8 @@ lastmod: 2017-02-01 categories: [functions] tags: [menus] ns: -signature: [] -workson: [] +signature: ["HasMenuCurrent"] +workson: [menus] hugoversion: relatedfuncs: [] deprecated: false diff --git a/content/functions/highlight.md b/content/functions/highlight.md index 399ea4314..19f7e0cdc 100644 --- a/content/functions/highlight.md +++ b/content/functions/highlight.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [highlighting,pygments,code blocks,syntax] ns: -signature: [] +signature: ["highlight INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -25,4 +25,4 @@ See [Installing Hugo][installpygments] for more information on Pygments or [Synt [highlight]: /content-management/shortcodes/#highlight [installpygments]: /getting-started/installing/#installing-pygments-optional -[syntax]: /tools/syntax-highlighting/ \ No newline at end of file +[syntax]: /tools/syntax-highlighting/ diff --git a/content/functions/htmlEscape.md b/content/functions/htmlEscape.md index b578214c5..4f03a107a 100644 --- a/content/functions/htmlEscape.md +++ b/content/functions/htmlEscape.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings, html] ns: -signature: [] +signature: ["htmlEscape INPUT"] workson: [] hugoversion: relatedfuncs: [htmlUnescape] @@ -23,4 +23,4 @@ Bear in mind that, unless content is passed to `safeHTML`, output strings are es ``` {{ htmlEscape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo & Caddy > Wordpress & Apache" -``` \ No newline at end of file +``` diff --git a/content/functions/htmlUnescape.md b/content/functions/htmlUnescape.md index a4fc8bc27..d55578c3b 100644 --- a/content/functions/htmlUnescape.md +++ b/content/functions/htmlUnescape.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["htmlUnescape INPUT"] workson: [] hugoversion: relatedfuncs: [htmlEscape] @@ -23,4 +23,4 @@ Remember to pass the output of this to `safeHTML` if fully un-escaped characters ``` {{ htmlUnescape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo & Caddy > Wordpress & Apache" -``` \ No newline at end of file +``` diff --git a/content/functions/humanize.md b/content/functions/humanize.md index bc724e523..48fdc6e61 100644 --- a/content/functions/humanize.md +++ b/content/functions/humanize.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,casing] ns: -signature: [] +signature: ["humanize INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/i18n.md b/content/functions/i18n.md index 59c451f1d..abf91b05c 100644 --- a/content/functions/i18n.md +++ b/content/functions/i18n.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [internationalization,i18n,multilingual] ns: -signature: [] +signature: ["i18n KEY", "T KEY"] workson: [] hugoversion: relatedfuncs: [] @@ -29,4 +29,4 @@ This translates a piece of content based on your `i18n/en-US.yaml` (and friends) For more information about string translations, see [Translation of Strings in Multilingual Mode][multistrings]. -[multistrings]: /content-management/multilingual/#translation-of-strings \ No newline at end of file +[multistrings]: /content-management/multilingual/#translation-of-strings diff --git a/content/functions/imageConfig.md b/content/functions/imageConfig.md index 0807c11a3..d0ab77e59 100644 --- a/content/functions/imageConfig.md +++ b/content/functions/imageConfig.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [images] ns: -signature: [] +signature: ["imageConfig PATH"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/in.md b/content/functions/in.md index 5aa86a1a2..f2924f916 100644 --- a/content/functions/in.md +++ b/content/functions/in.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["in SET ITEM"] workson: [] hugoversion: relatedfuncs: [] @@ -28,4 +28,4 @@ In addition, `in` can also check if a substring exists in a string. ``` {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }} -``` \ No newline at end of file +``` diff --git a/content/functions/index-function.md b/content/functions/index-function.md index 149952904..9c152a272 100644 --- a/content/functions/index-function.md +++ b/content/functions/index-function.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["index COLLECTION INDEX", "index COLLECTION KEY"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/int.md b/content/functions/int.md index 2baced82d..59e194d74 100644 --- a/content/functions/int.md +++ b/content/functions/int.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,integers] ns: -signature: [] +signature: ["int INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -21,4 +21,4 @@ Creates an integer (`int`) from the argument passed into the function. Useful fo ``` {{ int "123" }} → 123 -``` \ No newline at end of file +``` diff --git a/content/functions/intersect.md b/content/functions/intersect.md index 769fb27e4..c230d8b10 100644 --- a/content/functions/intersect.md +++ b/content/functions/intersect.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["intersect SET1 SET2"] workson: [] hugoversion: relatedfuncs: [] @@ -40,4 +40,4 @@ The following is an example of a "related posts" [partial template][partials] th {{% /code %}} [partials]: /templates/partials/ -[single]: /templates/single-page-templates/ \ No newline at end of file +[single]: /templates/single-page-templates/ diff --git a/content/functions/ismenucurrent.md b/content/functions/ismenucurrent.md index 006439a57..e764d8512 100644 --- a/content/functions/ismenucurrent.md +++ b/content/functions/ismenucurrent.md @@ -9,8 +9,8 @@ lastmod: 2017-02-01 categories: [functions] tags: [menus] ns: -signature: [] -workson: [] +signature: ["IsMenuCurrent"] +workson: [menus] hugoversion: relatedfuncs: [] deprecated: false @@ -18,4 +18,4 @@ draft: false aliases: [] --- -Used in [menu templates](/templates/menu-templates/). \ No newline at end of file +Used in [menu templates](/templates/menu-templates/). diff --git a/content/functions/isset.md b/content/functions/isset.md index e7e80fb71..1e737dfe5 100644 --- a/content/functions/isset.md +++ b/content/functions/isset.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["isset COLLECTION INDEX", "isset COLLECTION KEY"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/jsonify.md b/content/functions/jsonify.md index 29cc27043..12327d929 100644 --- a/content/functions/jsonify.md +++ b/content/functions/jsonify.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,json] ns: -signature: [] +signature: ["jsonify INPUT"] workson: [] hugoversion: relatedfuncs: [plainify] @@ -25,4 +25,4 @@ aliases: [] See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars]. -[pagevars]: /variables/page/ \ No newline at end of file +[pagevars]: /variables/page/ diff --git a/content/functions/last.md b/content/functions/last.md index b33188c1a..80729557e 100644 --- a/content/functions/last.md +++ b/content/functions/last.md @@ -10,7 +10,7 @@ tags: [] categories: [functions] toc: ns: -signature: [] +signature: ["last INDEX COLLECTION"] workson: [lists, taxonomies, terms, groups] hugoversion: relatedfuncs: [] diff --git a/content/functions/lower.md b/content/functions/lower.md index fdd33bd4e..6e6d76463 100644 --- a/content/functions/lower.md +++ b/content/functions/lower.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,casing] ns: -signature: [] +signature: ["lower INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/markdownify.md b/content/functions/markdownify.md index 8642bfbe0..fe3c618b8 100644 --- a/content/functions/markdownify.md +++ b/content/functions/markdownify.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 tags: [markdown,content] categories: [functions] ns: -signature: [] +signature: ["markdownify INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -21,4 +21,4 @@ aliases: [] ``` {{ .Title | markdownify }} -``` \ No newline at end of file +``` diff --git a/content/functions/math.md b/content/functions/math.md index d9b18346d..8de26f38a 100644 --- a/content/functions/math.md +++ b/content/functions/math.md @@ -28,4 +28,4 @@ There are 6 basic mathematical operators that can be used in Hugo templates: | `mod` | Modulus of two integers. | `{{mod 15 3}}` → 0 | | `modBool`| Boolean of modulus of two integers. Evaluates to `true` if = 0. | `{{modBool 15 3}}` → true | | `mul` | Multiplies two integers. | `{{mul 2 3}}` → 6 | -| `sub` | Subtracts two integers. | `{{sub 3 2}}` → 1 | \ No newline at end of file +| `sub` | Subtracts two integers. | `{{sub 3 2}}` → 1 | diff --git a/content/functions/md5.md b/content/functions/md5.md index 5074d5082..257048d3c 100644 --- a/content/functions/md5.md +++ b/content/functions/md5.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["md5 INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/now.md b/content/functions/now.md index 1c2e04641..2ce3ba5bb 100644 --- a/content/functions/now.md +++ b/content/functions/now.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [dates,time] ns: -signature: [] +signature: ["now"] workson: [] hugoversion: relatedfuncs: [Unix,dateFormat] diff --git a/content/functions/param.md b/content/functions/param.md index da173dfd1..03d12f197 100644 --- a/content/functions/param.md +++ b/content/functions/param.md @@ -10,7 +10,7 @@ tags: [] categories: [functions] toc: ns: -signature: [] +signature: ["Param KEY"] workson: [] hugoversion: relatedfuncs: [] @@ -32,4 +32,4 @@ $.Param "image" [configuration]: /getting-started/configuration/ [pagevars]: /variables/page/ -[sitevars]: /variables/site/ \ No newline at end of file +[sitevars]: /variables/site/ diff --git a/content/functions/partialCached.md b/content/functions/partialCached.md index 2f5525558..3fc6a4683 100644 --- a/content/functions/partialCached.md +++ b/content/functions/partialCached.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["partialCached LAYOUT INPUT [VARIANT...]"] workson: [] hugoversion: relatedfuncs: [] @@ -37,4 +37,4 @@ If you need to pass additional parameters to create unique variants, you can pas {{ partialCached "footer.html" . .Params.country .Params.province }} ``` -Note that the variant parameters are not made available to the underlying partial template. They are only use to create a unique cache key. \ No newline at end of file +Note that the variant parameters are not made available to the underlying partial template. They are only use to create a unique cache key. diff --git a/content/functions/plainify.md b/content/functions/plainify.md index 318dc94b1..2264b6e7a 100644 --- a/content/functions/plainify.md +++ b/content/functions/plainify.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["plainify INPUT"] workson: [] hugoversion: relatedfuncs: [jsonify] diff --git a/content/functions/pluralize.md b/content/functions/pluralize.md index a1d767087..b29fc3149 100644 --- a/content/functions/pluralize.md +++ b/content/functions/pluralize.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["pluralize INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/printf.md b/content/functions/printf.md index 487e6a7c7..e44e631e0 100644 --- a/content/functions/printf.md +++ b/content/functions/printf.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["printf FORMAT INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -25,4 +25,4 @@ needsexamples: true ``` {{ printf "formatted %.2f" 3.1416 }} -``` \ No newline at end of file +``` diff --git a/content/functions/querify.md b/content/functions/querify.md index 42c1b74fe..75b9cd6ea 100644 --- a/content/functions/querify.md +++ b/content/functions/querify.md @@ -9,7 +9,7 @@ categories: [functions] tags: [urls] godocref: ns: -signature: [] +signature: ["querify KEY VALUE [KEY VALUE]..."] hugoversion: deprecated: false workson: [] @@ -29,4 +29,4 @@ This example renders the following HTML: ```html Search -``` \ No newline at end of file +``` diff --git a/content/functions/range.md b/content/functions/range.md index 931ee3995..90b45e522 100644 --- a/content/functions/range.md +++ b/content/functions/range.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [iteration,fundamentals] ns: -signature: [] +signature: ["range COLLECTION"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/readdir.md b/content/functions/readdir.md index 4cdafaaf3..6bb6ea774 100644 --- a/content/functions/readdir.md +++ b/content/functions/readdir.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [files] ns: -signature: [] +signature: ["readDir PATH"] workson: [] hugoversion: relatedfuncs: [readFile] diff --git a/content/functions/readfile.md b/content/functions/readfile.md index ae35160c7..c3d641c69 100644 --- a/content/functions/readfile.md +++ b/content/functions/readfile.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [files] ns: -signature: [] +signature: ["readFile PATH"] workson: [] hugoversion: relatedfuncs: [readDir] @@ -27,4 +27,4 @@ So, if you have a file with the name `README.txt` in the root of your project wi For more information on using `readDir` and `readFile` in your templates, see [Local File Templates][local]. -[local]: /templates/files/ \ No newline at end of file +[local]: /templates/files/ diff --git a/content/functions/ref.md b/content/functions/ref.md index 8fc94a602..b35b8da9c 100644 --- a/content/functions/ref.md +++ b/content/functions/ref.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [cross references, anchors] ns: -signature: [] +signature: ["ref PAGE CONTENT"] workson: [] hugoversion: relatedfuncs: [relref] @@ -25,4 +25,4 @@ aliases: [] These functions are used in two of Hugo's built-in shortcodes. You can see basic usage examples of both `ref` and `relref` in the [shortcode documentation](/content-management/shortcodes/#ref-and-relref). -For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/). \ No newline at end of file +For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/). diff --git a/content/functions/relLangURL.md b/content/functions/relLangURL.md index ed7fe4e95..2230e85aa 100644 --- a/content/functions/relLangURL.md +++ b/content/functions/relLangURL.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 tags: [multilingual,i18n,urls] categories: [functions] ns: -signature: [] +signature: ["relLangURL INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -27,4 +27,4 @@ So for a site `baseURL` set to `http://yoursite.com/hugo/` and the current lang {{ "blog/" | relLangURL }} → "/hugo/en/blog/" ``` -[multiliconfig]: /content-management/multilingual/#configuring-multilingual-mode \ No newline at end of file +[multiliconfig]: /content-management/multilingual/#configuring-multilingual-mode diff --git a/content/functions/relref.md b/content/functions/relref.md index cf4166341..40c266b9a 100644 --- a/content/functions/relref.md +++ b/content/functions/relref.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [cross references, anchors] ns: -signature: [] +signature: ["relref PAGE CONTENT"] workson: [] hugoversion: relatedfuncs: [relref] @@ -25,4 +25,4 @@ aliases: [] These functions are used in two of Hugo's built-in shortcodes. You can see basic usage examples of both `ref` and `relref` in the [shortcode documentation](/content-management/shortcodes/#ref-and-relref). -For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/). \ No newline at end of file +For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/). diff --git a/content/functions/relurl.md b/content/functions/relurl.md index 7284f6540..44702de4c 100644 --- a/content/functions/relurl.md +++ b/content/functions/relurl.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [urls] ns: -signature: [] +signature: ["relURL INPUT"] workson: [] hugoversion: relatedfuncs: [absURL] @@ -49,4 +49,4 @@ The above uses the [apply function][] and also exposes how the Go template parse [apply function]: /functions/apply/ [configuration]: /getting-started/configuration/ [jsonld]: https://developers.google.com/search/docs/guides/intro-structured-data -[safejs]: /functions/safejs \ No newline at end of file +[safejs]: /functions/safejs diff --git a/content/functions/render.md b/content/functions/render.md index f591b609f..6ebf06eb8 100644 --- a/content/functions/render.md +++ b/content/functions/render.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [views] ns: -signature: [] +signature: ["render LAYOUT"] workson: [] hugoversion: relatedfuncs: [] @@ -29,4 +29,4 @@ This example could render a piece of content using the content view located at ` {{ end }} ``` -[list context]: /templates/lists/ \ No newline at end of file +[list context]: /templates/lists/ diff --git a/content/functions/replace.md b/content/functions/replace.md index e2942e895..aa6b97e3f 100644 --- a/content/functions/replace.md +++ b/content/functions/replace.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["replace INPUT OLD NEW"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/replacere.md b/content/functions/replacere.md index 87629ad5a..e5acafac1 100644 --- a/content/functions/replacere.md +++ b/content/functions/replacere.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [regex] ns: -signature: [] +signature: ["replaceRE PATTERN REPLACEMENT INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -22,4 +22,4 @@ Replaces all occurrences of a regular expression with the replacement pattern. ```golang {{ replaceRE "^https?://([^/]+).*" "$1" "http://gohugo.io/docs" }}` → "gohugo.io" {{ "http://gohugo.io/docs" | replaceRE "^https?://([^/]+).*" "$1" }}` → "gohugo.io" -``` \ No newline at end of file +``` diff --git a/content/functions/safeCSS.md b/content/functions/safeCSS.md index 0a9f3cb1c..b0d4ed9b7 100644 --- a/content/functions/safeCSS.md +++ b/content/functions/safeCSS.md @@ -9,7 +9,7 @@ lastmod: 2017-02-26 categories: [functions] tags: [style,css,strings] ns: -signature: [] +signature: ["safeCSS INPUT"] workson: [] hugoversion: relatedfuncs: [safeHTML,safeHTMLAttr,] diff --git a/content/functions/safeHTML.md b/content/functions/safeHTML.md index 519623302..6438d9698 100644 --- a/content/functions/safeHTML.md +++ b/content/functions/safeHTML.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["safeHTML INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -38,4 +38,4 @@ However, without the `safeHTML` function, html/template assumes `.Site.Copyright

© 2015 Jane Doe. <a href="http://creativecommons.org/licenses by/4.0/">Some rights reserved</a>.

``` -[config]: /getting-started/configuration/ \ No newline at end of file +[config]: /getting-started/configuration/ diff --git a/content/functions/safeHTMLAttr.md b/content/functions/safeHTMLAttr.md index b96645c72..f8b3ce0ca 100644 --- a/content/functions/safeHTMLAttr.md +++ b/content/functions/safeHTMLAttr.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["safeHTMLAttr INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/safeJS.md b/content/functions/safeJS.md index 574c94729..b2238a83a 100644 --- a/content/functions/safeJS.md +++ b/content/functions/safeJS.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["safeJS INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/safeURL.md b/content/functions/safeURL.md index 89af8bd3b..7e2ef61f2 100644 --- a/content/functions/safeURL.md +++ b/content/functions/safeURL.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 tags: [strings,urls] categories: [functions] ns: -signature: [] +signature: ["safeURL INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/scratch.md b/content/functions/scratch.md index 32874b44f..590c4cac5 100644 --- a/content/functions/scratch.md +++ b/content/functions/scratch.md @@ -69,4 +69,4 @@ The usage is best illustrated with some samples: **Note:** The examples above uses the special `$` variable, which refers to the top-level node. This is the behavior you most likely want, and will help remove some confusion when using `Scratch` inside page range loops -- and you start inadvertently calling the wrong `Scratch`. But there may be use cases for `{{ .Scratch.Add "key" "some value" }}`. -[pagevars]: /variables/page/ \ No newline at end of file +[pagevars]: /variables/page/ diff --git a/content/functions/seq.md b/content/functions/seq.md index f5d708995..053fbb746 100644 --- a/content/functions/seq.md +++ b/content/functions/seq.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [] ns: -signature: [] +signature: ["seq LAST", "seq FIRST LAST", "seq FIRST INCREMENT LAST"] workson: [] hugoversion: relatedfuncs: [] @@ -46,4 +46,4 @@ $indexStartingAt1 := (add $index 1) ``` -[GNU's seq]: http://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation \ No newline at end of file +[GNU's seq]: http://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation diff --git a/content/functions/sha.md b/content/functions/sha.md index d44aa004d..7258bcab8 100644 --- a/content/functions/sha.md +++ b/content/functions/sha.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [sha,checksum] ns: -signature: [] +signature: ["sha1 INPUT", "sha256 INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -29,4 +29,4 @@ aliases: [] ```html {{ sha256 "Hello world, gophers!" }} -``` \ No newline at end of file +``` diff --git a/content/functions/shuffle.md b/content/functions/shuffle.md index 920e5dc57..8df7a19ec 100644 --- a/content/functions/shuffle.md +++ b/content/functions/shuffle.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 tags: [ordering] categories: [functions] ns: -signature: [] +signature: ["shuffle COLLECTION"] workson: [] hugoversion: relatedfuncs: [] @@ -37,4 +37,4 @@ This example would return the following: ``` {{% /output %}} -This example also makes use of the [slice](/functions/slice/) and [seq](/functions/seq/) functions. \ No newline at end of file +This example also makes use of the [slice](/functions/slice/) and [seq](/functions/seq/) functions. diff --git a/content/functions/singularize.md b/content/functions/singularize.md index b5c231a48..725c8e3af 100644 --- a/content/functions/singularize.md +++ b/content/functions/singularize.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings,singular] ns: -signature: [] +signature: ["singularize INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/slice.md b/content/functions/slice.md index 656ce2760..f45d0c0e7 100644 --- a/content/functions/slice.md +++ b/content/functions/slice.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [slice, array, interface] ns: -signature: [] +signature: ["slice ITEM..."] workson: [] hugoversion: relatedfuncs: [] @@ -32,4 +32,4 @@ One use case is the concatenation of elements in combination with the [`delimit` {{% /code %}} -[`delimit` function]: /functions/delimit/ \ No newline at end of file +[`delimit` function]: /functions/delimit/ diff --git a/content/functions/slicestr.md b/content/functions/slicestr.md index 102c544e4..eb5b723b8 100644 --- a/content/functions/slicestr.md +++ b/content/functions/slicestr.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["slicestr STRING START [END]"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/split.md b/content/functions/split.md index d55f8eb99..3a5901cd6 100644 --- a/content/functions/split.md +++ b/content/functions/split.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["split STRING DELIM"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/string.md b/content/functions/string.md index 10be54adb..b34c13efb 100644 --- a/content/functions/string.md +++ b/content/functions/string.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["string INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/substr.md b/content/functions/substr.md index 63c1551f3..8567749d1 100644 --- a/content/functions/substr.md +++ b/content/functions/substr.md @@ -10,7 +10,7 @@ categories: [functions] tags: [strings] aliases: [] ns: -signature: [] +signature: ["substr STRING START [LENGTH]"] workson: [] hugoversion: relatedfuncs: [] @@ -28,4 +28,4 @@ In addition, borrowing from the extended behavior described at http://php.net su ``` {{substr "BatMan" 0 -3}} → "Bat" {{substr "BatMan" 3 3}} → "Man" -``` \ No newline at end of file +``` diff --git a/content/functions/time.md b/content/functions/time.md index a230cb33a..da5f4c198 100644 --- a/content/functions/time.md +++ b/content/functions/time.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [dates,time] ns: -signature: [] +signature: ["time INPUT"] workson: [] hugoversion: relatedfuncs: [] @@ -23,4 +23,4 @@ aliases: [] {{ time "2016-05-28" }} → "2016-05-28T00:00:00Z" {{ (time "2016-05-28").YearDay }} → 149 {{ mul 1000 (time "2016-05-28T10:30:00.00+10:00").Unix }} → 1464395400000, or Unix time in milliseconds -``` \ No newline at end of file +``` diff --git a/content/functions/title.md b/content/functions/title.md index a6428e6aa..e66ff7dc2 100644 --- a/content/functions/title.md +++ b/content/functions/title.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [fundamentals,strings] ns: -signature: [] +signature: ["title INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/trim.md b/content/functions/trim.md index 7074a4daf..937f15683 100644 --- a/content/functions/trim.md +++ b/content/functions/trim.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["trim INPUT CUTLIST"] workson: [] hugoversion: relatedfuncs: [] @@ -20,4 +20,4 @@ deprecated: false ``` {{ trim "++Batman--" "+-" }} → "Batman" -``` \ No newline at end of file +``` diff --git a/content/functions/truncate.md b/content/functions/truncate.md index a6f6d1d18..f1328fe9c 100644 --- a/content/functions/truncate.md +++ b/content/functions/truncate.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [strings] ns: -signature: [] +signature: ["truncate SIZE INPUT", "truncate SIZE ELLIPSIS INPUT"] workson: [] hugoversion: 19 relatedfuncs: [] @@ -24,4 +24,4 @@ Truncate a text to a max length without cutting words or leaving unclosed HTML t {{% note %}} If you have a raw string that contains HTML tags you want to remain treated as HTML, you will need to convert the string to HTML using the [`safeHTML` template function](/functions/safehtml) before sending the value to truncate. Otherwise, the HTML tags will be escaped when passed through the `truncate` function. -{{% /note %}} \ No newline at end of file +{{% /note %}} diff --git a/content/functions/union.md b/content/functions/union.md index 24590bb8c..6795c80c4 100644 --- a/content/functions/union.md +++ b/content/functions/union.md @@ -9,7 +9,7 @@ lastmod: 2017-03-12 categories: [functions] tags: [filtering,lists] ns: -signature: [] +signature: ["union SET1 SET2"] workson: [] hugoversion: 0.20 relatedfuncs: [intersect,where] @@ -31,4 +31,4 @@ Given two arrays (or slices) A and B, this function will return a new array that {{ union nil nil }} -``` \ No newline at end of file +``` diff --git a/content/functions/unix.md b/content/functions/unix.md index 97f42bc20..1751afcf8 100644 --- a/content/functions/unix.md +++ b/content/functions/unix.md @@ -9,8 +9,8 @@ lastmod: 2017-02-01 tags: [dates,time] categories: [functions] ns: -signature: [] -workson: [] +signature: ["Unix"] +workson: [times] hugoversion: relatedfuncs: [Format,dateFormat,now,time] deprecated: false @@ -59,4 +59,4 @@ Hugo's output is *static*. In example 2, a month-old page published on a Hugo si -[partial template]: /templates/partials/ \ No newline at end of file +[partial template]: /templates/partials/ diff --git a/content/functions/upper.md b/content/functions/upper.md index 0005240a1..e82e8b4fe 100644 --- a/content/functions/upper.md +++ b/content/functions/upper.md @@ -10,7 +10,7 @@ tags: [] categories: [functions] toc: ns: -signature: [] +signature: ["upper INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/content/functions/urlize.md b/content/functions/urlize.md index 90581b28d..34cc3db94 100644 --- a/content/functions/urlize.md +++ b/content/functions/urlize.md @@ -9,7 +9,7 @@ categories: [functions] tags: [urls,strings] godocref: ns: -signature: [] +signature: ["urlize INPUT"] hugoversion: deprecated: false workson: [] @@ -65,4 +65,4 @@ The preceding partial would then output to the rendered page as follows, assumin {{% /output %}} -[singletemplate]: /templates/single-page-templates/ \ No newline at end of file +[singletemplate]: /templates/single-page-templates/ diff --git a/content/functions/where.md b/content/functions/where.md index 62c103983..5bca61498 100644 --- a/content/functions/where.md +++ b/content/functions/where.md @@ -9,7 +9,7 @@ lastmod: 2017-02-01 categories: [functions] tags: [filtering] ns: -signature: [] +signature: ["where COLLECTION KEY [OPERATOR] MATCH"] workson: [lists,taxonomies,terms,groups] hugoversion: relatedfuncs: [intersect,first,after,last] @@ -136,4 +136,4 @@ Only the following operators are available for `nil` {{ end }} ``` -[intersect]: /functions/intersect/ \ No newline at end of file +[intersect]: /functions/intersect/ diff --git a/content/functions/with.md b/content/functions/with.md index 77699fd46..d3c131530 100644 --- a/content/functions/with.md +++ b/content/functions/with.md @@ -9,7 +9,7 @@ lastmod: 2017-03-12 categories: [functions] tags: [conditionals,fundamentals] ns: -signature: [] +signature: ["with INPUT"] workson: [] hugoversion: relatedfuncs: [] diff --git a/themes/hugo-docs-concept/layouts/_default/baseof.html b/themes/hugo-docs-concept/layouts/_default/baseof.html index cd908de42..dbd298e1b 100644 --- a/themes/hugo-docs-concept/layouts/_default/baseof.html +++ b/themes/hugo-docs-concept/layouts/_default/baseof.html @@ -16,4 +16,4 @@ {{ block "addscripts" . }} {{ end }} - \ No newline at end of file + diff --git a/themes/hugo-docs-concept/layouts/_default/single.html b/themes/hugo-docs-concept/layouts/_default/single.html index 95e1ec19f..1806f12f8 100644 --- a/themes/hugo-docs-concept/layouts/_default/single.html +++ b/themes/hugo-docs-concept/layouts/_default/single.html @@ -11,10 +11,13 @@ {{ end }}
+ {{- if eq .Section "functions" -}} + {{- partial "functions-signature.html" . -}} + {{- end -}} {{.Content}}
{{- partial "content-footer.html" . -}} {{- partial "table-of-contents.html" . -}} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/themes/hugo-docs-concept/layouts/partials/functions-signature.html b/themes/hugo-docs-concept/layouts/partials/functions-signature.html new file mode 100644 index 000000000..c072cf674 --- /dev/null +++ b/themes/hugo-docs-concept/layouts/partials/functions-signature.html @@ -0,0 +1,9 @@ +{{ if isset .Params "signature" -}} + {{- with .Params.signature }} +
+    {{- range . }}
+{{ . }}
+    {{- end }}
+
+ {{- end -}} +{{ end }} diff --git a/themes/hugo-docs-concept/layouts/partials/homepage/homepage-header.html b/themes/hugo-docs-concept/layouts/partials/homepage/homepage-header.html index b1c8d2837..073a7c941 100644 --- a/themes/hugo-docs-concept/layouts/partials/homepage/homepage-header.html +++ b/themes/hugo-docs-concept/layouts/partials/homepage/homepage-header.html @@ -1,7 +1,7 @@