Name: C
- Aliases:
- csharp
- - c#
- Name: C#
+ - 'c#'
+ Name: 'C#'
- Aliases:
- cpp
- c++
Name: C++
+ - Aliases:
+ - c3
+ Name: C3
- Aliases:
- caddyfile
- caddy
- desktop
- desktop_entry
Name: Desktop file
+ - Aliases:
+ - devicetree
+ - dts
+ Name: Devicetree
- Aliases:
- diff
- udiff
- Aliases:
- jungle
Name: Jungle
+ - Aliases:
+ - kak
+ - kakoune
+ - kakrc
+ - kakscript
+ Name: Kakoune
+ - Aliases:
+ - kdl
+ Name: KDL
- Aliases:
- kotlin
Name: Kotlin
- md
- mkd
Name: markdown
+ - Aliases:
+ - mess
+ Name: Markless
- Aliases:
- mason
Name: Mason
- Aliases:
- metal
Name: Metal
+ - Aliases:
+ - µcad
+ Name: microcad
- Aliases:
- minizinc
- MZN
- Aliases:
- mlir
Name: MLIR
+ - Aliases:
+ - modelica
+ Name: Modelica
- Aliases:
- modula2
- m2
Name: Modula-2
- Aliases:
- mojo
- - "\U0001F525"
+ - 🔥
Name: Mojo
- Aliases:
- monkeyc
Name: MonkeyC
+ - Aliases:
+ - moonbit
+ - mbt
+ Name: MoonBit
- Aliases:
- moonscript
- moon
- protobuf
- proto
Name: Protocol Buffer
+ - Aliases:
+ - txtpb
+ Name: Protocol Buffer Text Format
- Aliases:
- prql
Name: PRQL
- sage
- python3
- py3
+ - starlark
Name: Python
- Aliases:
- python2
- rexx
- arexx
Name: Rexx
+ - Aliases:
+ - rgbasm
+ Name: RGBDS Assembly
+ - Aliases:
+ - ring
+ Name: Ring
- Aliases:
- SQLRPGLE
- RPG IV
Name: vue
- Aliases: null
Name: WDTE
+ - Aliases:
+ - wast
+ - wat
+ Name: WebAssembly Text Format
- Aliases:
- wgsl
Name: WebGPU Shading Language
- algol
- algol_nu
- arduino
+ - ashen
+ - aura-theme-dark
+ - aura-theme-dark-soft
- autumn
- average
- base16-snazzy
archeTypeDir: archetypes
assetDir: assets
author: {}
- baseURL: ""
+ baseURL: ''
build:
buildStats:
disableClasses: false
disableTags: false
enable: false
cacheBusters:
- - source: (postcss|tailwind)\.config\.js
+ - source: '(postcss|tailwind)\.config\.js'
target: (css|styles|scss|sass)
noJSConfigInAssets: false
useResourceCacheWhen: fallback
buildDrafts: false
buildExpired: false
buildFuture: false
- cacheDir: ""
+ cacheDir: ''
caches:
assets:
dir: :resourceDir/_gen
misc:
dir: :cacheDir/:project
maxAge: -1
+ modulequeries:
+ dir: :cacheDir/modules
+ maxAge: 24h
modules:
dir: :cacheDir/modules
maxAge: -1
canonifyURLs: false
capitalizeListTitles: true
- cascade: []
+ cascade: null
cleanDestinationDir: false
contentDir: content
contentTypes:
text/org: {}
text/pandoc: {}
text/rst: {}
- copyright: ""
+ copyright: ''
dataDir: data
defaultContentLanguage: en
defaultContentLanguageInSubdir: false
+ defaultContentRole: guest
+ defaultContentRoleInSubdir: false
+ defaultContentVersion: ''
+ defaultContentVersionInSubdir: false
defaultOutputFormat: html
deployment:
confirm: false
matchers: null
maxDeletes: 256
order: null
- target: ""
+ target: ''
targets: null
workers: 10
disableAliases: false
disableDefaultLanguageRedirect: false
+ disableDefaultSiteRedirect: false
disableHugoGeneratorInject: false
disableKinds: null
disableLanguages: null
ignoreCache: false
ignoreFiles: null
ignoreLogs: null
- ignoreVendorPaths: ""
+ ignoreVendorPaths: ''
imaging:
bgColor: '#ffffff'
+ compression: lossy
hint: photo
quality: 75
resampleFilter: box
- languageCode: ""
+ webp:
+ method: 4
+ useSharpYuv: true
+ languageCode: ''
languages:
en:
disabled: false
- languageCode: ""
- languageDirection: ""
- languageName: ""
- title: ""
+ languageCode: ''
+ languageDirection: ''
+ languageName: ''
+ title: ''
weight: 0
layoutDir: layouts
mainSections: null
markup:
- asciidocExt:
+ asciiDocExt:
attributes: {}
backend: html5
extensions: []
anchorLineNos: false
codeFences: true
guessSyntax: false
- hl_Lines: ""
+ hl_Lines: ''
hl_inline: false
- lineAnchors: ""
+ lineAnchors: ''
lineNoStart: 1
lineNos: false
lineNumbersInTable: true
tdewolff:
css:
inline: false
- keepCSS2: false
precision: 0
version: 0
html:
keepSpecialComments: true
keepWhitespace: false
templateDelims:
- - ""
- - ""
+ - ''
+ - ''
js:
keepVarNames: false
precision: 0
keepNumbers: false
precision: 0
svg:
- inline: false
keepComments: false
precision: 0
xml:
keepWhitespace: false
module:
- auth: ""
+ auth: ''
hugoVersion:
extended: false
- max: ""
- min: ""
+ max: ''
+ min: ''
imports: null
mounts:
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: content
target: content
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: data
target: data
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: layouts
target: layouts
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: i18n
target: i18n
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: archetypes
target: archetypes
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: assets
target: assets
- disableWatch: false
- excludeFiles: null
- includeFiles: null
- lang: ""
+ files: null
+ sites:
+ complements:
+ languages: null
+ roles: null
+ versions: null
+ matrix:
+ languages: null
+ roles: null
+ versions: null
source: static
target: static
noProxy: none
- noVendor: ""
+ noVendor: ''
params: null
private: '*.*'
proxy: direct
replacements: null
vendorClosest: false
- workspace: "off"
- newContentEditor: ""
+ workspace: 'off'
+ newContentEditor: ''
noBuildLock: false
noChmod: false
noTimes: false
outputFormats:
- "404":
- baseName: ""
+ '404':
+ baseName: ''
isHTML: true
isPlainText: false
mediaType: text/html
noUgly: false
notAlternative: true
- path: ""
+ path: ''
permalinkable: true
- protocol: ""
- rel: ""
+ protocol: ''
+ rel: ''
root: false
ugly: true
weight: 0
alias:
- baseName: ""
+ baseName: ''
isHTML: true
isPlainText: false
mediaType: text/html
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
- rel: ""
+ protocol: ''
+ rel: ''
root: false
ugly: true
weight: 0
notAlternative: false
path: amp
permalinkable: true
- protocol: ""
+ protocol: ''
rel: amphtml
root: false
ugly: false
mediaType: text/calendar
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
protocol: webcal://
rel: alternate
mediaType: text/css
noUgly: false
notAlternative: true
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: stylesheet
root: false
ugly: false
mediaType: text/csv
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: alternate
root: false
ugly: false
weight: 0
gotmpl:
- baseName: ""
+ baseName: ''
isHTML: false
isPlainText: true
mediaType: text/x-gotmpl
noUgly: false
notAlternative: true
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
- rel: ""
+ protocol: ''
+ rel: ''
root: false
ugly: false
weight: 0
mediaType: text/html
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: true
- protocol: ""
+ protocol: ''
rel: canonical
root: false
ugly: false
mediaType: application/json
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: alternate
root: false
ugly: false
mediaType: text/markdown
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: alternate
root: false
ugly: false
mediaType: text/plain
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: alternate
root: true
ugly: false
mediaType: application/rss+xml
noUgly: true
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: alternate
root: false
ugly: false
mediaType: application/xml
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: sitemap
root: false
ugly: true
mediaType: application/xml
noUgly: false
notAlternative: false
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: sitemap
root: true
ugly: true
mediaType: application/manifest+json
noUgly: false
notAlternative: true
- path: ""
+ path: ''
permalinkable: false
- protocol: ""
+ protocol: ''
rel: manifest
root: false
ugly: false
nextPrevInSectionSortOrder: desc
nextPrevSortOrder: desc
paginate: 0
- paginatePath: ""
+ paginatePath: ''
pagination:
disableAliases: false
pagerSize: 10
disable: false
googleAnalytics:
disable: false
- respectDoNotTrack: false
+ respectDoNotTrack: true
instagram:
disable: false
simple: false
- twitter:
- disable: false
- enableDNT: false
- simple: false
vimeo:
disable: false
enableDNT: false
disable: false
privacyEnhanced: false
publishDir: public
- refLinksErrorLevel: ""
- refLinksNotFoundURL: ""
+ refLinksErrorLevel: ''
+ refLinksNotFoundURL: ''
related:
includeNewer: false
indices:
- applyFilter: false
cardinalityThreshold: 0
name: keywords
- pattern: ""
+ pattern: ''
toLower: false
type: basic
weight: 100
- applyFilter: false
cardinalityThreshold: 0
name: date
- pattern: ""
+ pattern: ''
toLower: false
type: basic
weight: 10
- applyFilter: false
cardinalityThreshold: 0
name: tags
- pattern: ""
+ pattern: ''
toLower: false
type: basic
weight: 80
removePathAccents: false
renderSegments: null
resourceDir: resources
- sectionPagesMenu: ""
+ roles:
+ guest:
+ weight: 0
+ sectionPagesMenu: ''
security:
enableInlineShortcodes: false
exec:
- ^postcss$
- ^tailwindcss$
osEnv:
- - (?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$
+ - '(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$'
funcs:
getenv:
- ^HUGO_
- force: false
from: /**
fromHeaders: null
- fromRe: ""
+ fromRe: ''
status: 404
to: /404.html
services:
disqus:
- shortname: ""
+ shortname: ''
googleAnalytics:
- id: ""
- instagram:
- accessToken: ""
- disableInlineCSS: false
+ id: ''
rss:
limit: -1
- twitter:
- disableInlineCSS: false
x:
disableInlineCSS: false
sitemap:
- changeFreq: ""
+ changeFreq: ''
disable: false
filename: sitemap.xml
priority: -1
- static
staticDir0: null
staticDir1: null
+ staticDir10: null
staticDir2: null
staticDir3: null
staticDir4: null
staticDir7: null
staticDir8: null
staticDir9: null
- staticDir10: null
summaryLength: 70
taxonomies:
category: categories
templateMetricsHints: false
theme: null
themesDir: themes
- timeZone: ""
+ timeZone: ''
timeout: 60s
- title: ""
+ title: ''
titleCaseStyle: AP
uglyURLs: {}
- workingDir: ""
+ versions:
+ v1.0.0:
+ weight: 0
+ workingDir: ''
config_helpers:
mergeStrategy:
build:
_merge: none
related:
_merge: none
+ roles:
+ _merge: none
security:
_merge: none
segments:
_merge: none
taxonomies:
_merge: none
+ versions:
+ _merge: none
output:
layouts: {}
tpl:
Aliases:
- after
Args:
- - "n"
+ - 'n'
- l
Description: After returns all the items after the first n items in list l.
Examples: []
- append
Args:
- args
- Description: "Append appends args up to the last one to the slice in the last
- argument.\nThis construct allows template constructs like this:\n\n\t{{
- $pages = $pages | append $p2 $p1 }}\n\nNote that with 2 arguments where
- both are slices of the same type,\nthe first slice will be appended to the
- second:\n\n\t{{ $pages = $pages | append .Site.RegularPages }}"
+ Description: |-
+ Append appends args up to the last one to the slice in the last argument.
+ This construct allows template constructs like this:
+
+ {{ $pages = $pages | append $p2 $p1 }}
+
+ Note that with 2 arguments where both are slices of the same type,
+ the first slice will be appended to the second:
+
+ {{ $pages = $pages | append .Site.RegularPages }}
Examples: []
Apply:
Aliases:
- c
- fname
- args
- Description: Apply takes an array or slice c and returns a new slice with
- the function fname applied over it.
+ Description: Apply takes an array or slice c and returns a new slice with the function fname applied over it.
Examples: []
Complement:
Aliases:
- complement
Args:
- ls
- Description: "Complement gives the elements in the last element of ls that
- are not in\nany of the others.\n\nAll elements of ls must be slices or arrays
- of comparable types.\n\nThe reasoning behind this rather clumsy API is so
- we can do this in the templates:\n\n\t{{ $c := .Pages | complement $last4
- }}"
+ Description: |-
+ Complement gives the elements in the last element of ls that are not in
+ any of the others.
+
+ All elements of ls must be slices or arrays of comparable types.
+
+ The reasoning behind this rather clumsy API is so we can do this in the templates:
+
+ {{ $c := .Pages | complement $last4 }}
Examples:
- - - '{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice
- "d" "e") }}'
+ - - '{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice "d" "e") }}'
- '[a f]'
D:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - seed
+ - 'n'
+ - hi
+ Description: 'D returns a sorted slice of unique random integers in the half-open interval\n[0, hi) using the provided seed value. The number of elements in the\nresulting slice is n or hi, whichever is less.\n\nIf n <= hi, it returns a sorted random sample of size n using J. S. Vitter’s\nMethod D for sequential random sampling.\n\nIf n > hi, it returns the full, sorted range [0, hi) of size hi.\n\nIf n == 0 or hi == 0, it returns an empty slice.\n\nReference:\n\n\tJ. S. Vitter, "An efficient algorithm for sequential random sampling," ACM Trans. Math. Softw., vol. 11, no. 1, pp. 37–57, 1985.\n\tSee also: https://getkerf.wordpress.com/2016/03/30/the-best-algorithm-no-one-knows-about/'
+ Examples: []
Delimit:
Aliases:
- delimit
Args:
- l
- v
- Description: In returns whether v is in the list l. l may be an array or
- slice.
+ Description: In returns whether v is in the list l. l may be an array or slice.
Examples:
- - - '{{ if in "this string contains a substring" "substring" }}Substring found!{{
- end }}'
+ - - '{{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}'
- Substring found!
Index:
Aliases:
Index returns the result of indexing its first argument by the following
arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
indexed item must be a map, slice, or array.
-
+
Adapted from Go stdlib src/text/template/funcs.go.
-
+
We deviate from the stdlib mostly because of https://github.com/golang/go/issues/14751.
Examples: []
Intersect:
Description: |-
Merge creates a copy of the final parameter in params and merges the preceding
parameters into it in reverse order.
-
+
Currently only maps are supported. Key handling is case insensitive.
Examples:
- - - '{{ dict "title" "Hugo Rocks!" | collections.Merge (dict "title" "Default
- Title" "description" "Yes, Hugo Rocks!") | sort }}'
+ - - '{{ dict "title" "Hugo Rocks!" | collections.Merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!") | sort }}'
- '[Yes, Hugo Rocks! Hugo Rocks!]'
- - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!")
- (dict "title" "Hugo Rocks!") | sort }}'
+ - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!") (dict "title" "Hugo Rocks!") | sort }}'
- '[Yes, Hugo Rocks! Hugo Rocks!]'
- - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!")
- (dict "title" "Hugo Rocks!") (dict "extra" "For reals!") | sort }}'
+ - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!") (dict "title" "Hugo Rocks!") (dict "extra" "For reals!") | sort }}'
- '[Yes, Hugo Rocks! For reals! Hugo Rocks!]'
NewScratch:
Aliases:
NewScratch creates a new Scratch which can be used to store values in a
thread safe way.
Examples:
- - - '{{ $scratch := newScratch }}{{ $scratch.Add "b" 2 }}{{ $scratch.Add "b"
- 2 }}{{ $scratch.Get "b" }}'
- - "4"
+ - - '{{ $scratch := newScratch }}{{ $scratch.Add "b" 2 }}{{ $scratch.Add "b" 2 }}{{ $scratch.Get "b" }}'
+ - '4'
Querify:
Aliases:
- querify
Querify returns a URL query string composed of the given key-value pairs,
encoded and sorted by key.
Examples:
- - - '{{ (querify "foo" 1 "bar" 2 "baz" "with spaces" "qux" "this&that=those")
- | safeHTML }}'
+ - - '{{ (querify "foo" 1 "bar" 2 "baz" "with spaces" "qux" "this&that=those") | safeHTML }}'
- bar=2&baz=with+spaces&foo=1&qux=this%26that%3Dthose
- - - <a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL
- }}">Search</a>
+ - - <a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL }}">Search</a>
- <a href="https://www.google.com?page=3&q=test">Search</a>
- - '{{ slice "foo" 1 "bar" 2 | querify | safeHTML }}'
- bar=2&foo=1
Reverse:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - l
+ Description: Reverse creates a copy of the list l and reverses it.
+ Examples: []
Seq:
Aliases:
- seq
Args:
- args
- Description: "Seq creates a sequence of integers from args. It's named and
- used as GNU's seq.\n\nExamples:\n\n\t3 => 1, 2, 3\n\t1 2 4 => 1, 3\n\t-3
- => -1, -2, -3\n\t1 4 => 1, 2, 3, 4\n\t1 -2 => 1, 0, -1, -2"
+ Description: |-
+ Seq creates a sequence of integers from args. It's named and used as GNU's seq.
+
+ Examples:
+
+ 3 => 1, 2, 3
+ 1 2 4 => 1, 3
+ -3 => -1, -2, -3
+ 1 4 => 1, 2, 3, 4
+ 1 -2 => 1, 0, -1, -2
Examples:
- - '{{ seq 3 }}'
- '[1 2 3]'
- uniq
Args:
- l
- Description: Uniq returns a new list with duplicate elements in the list l
- removed.
+ Description: Uniq returns a new list with duplicate elements in the list l removed.
Examples:
- - '{{ slice 1 2 3 2 | uniq }}'
- '[1 2 3]'
- v2
Description: |-
Conditional can be used as a ternary operator.
-
+
It returns v1 if cond is true, else v2.
Examples:
- - '{{ cond (eq (add 2 2) 4) "2+2 is 4" "what?" | safeHTML }}'
Args:
- first
- others
- Description: Eq returns the boolean truth of arg1 == arg2 || arg1 == arg3
- || arg1 == arg4.
+ Description: Eq returns the boolean truth of arg1 == arg2 || arg1 == arg3 || arg1 == arg4.
Examples:
- - '{{ if eq .Section "blog" }}current-section{{ end }}'
- current-section
Args:
- first
- others
- Description: Ge returns the boolean truth of arg1 >= arg2 && arg1 >= arg3
- && arg1 >= arg4.
+ Description: Ge returns the boolean truth of arg1 >= arg2 && arg1 >= arg3 && arg1 >= arg4.
Examples:
- - '{{ if ge hugo.Version "0.80" }}Reasonable new Hugo version!{{ end }}'
- Reasonable new Hugo version!
Args:
- first
- others
- Description: Gt returns the boolean truth of arg1 > arg2 && arg1 > arg3 &&
- arg1 > arg4.
+ Description: Gt returns the boolean truth of arg1 > arg2 && arg1 > arg3 && arg1 > arg4.
Examples: []
Le:
Aliases:
Args:
- first
- others
- Description: Le returns the boolean truth of arg1 <= arg2 && arg1 <= arg3
- && arg1 <= arg4.
+ Description: Le returns the boolean truth of arg1 <= arg2 && arg1 <= arg3 && arg1 <= arg4.
Examples: []
Lt:
Aliases:
Args:
- first
- others
- Description: Lt returns the boolean truth of arg1 < arg2 && arg1 < arg3 &&
- arg1 < arg4.
+ Description: Lt returns the boolean truth of arg1 < arg2 && arg1 < arg3 && arg1 < arg4.
Examples: []
LtCollate:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - collator
+ - first
+ - others
+ Description: |-
+ LtCollate returns the boolean truth of arg1 < arg2 && arg1 < arg3 && arg1 < arg4.
+ The provided collator will be used for string comparisons.
+ This is for internal use.
+ Examples: []
Ne:
Aliases:
- ne
Args:
- first
- others
- Description: Ne returns the boolean truth of arg1 != arg2 && arg1 != arg3
- && arg1 != arg4.
+ Description: Ne returns the boolean truth of arg1 != arg2 && arg1 != arg3 && arg1 != arg4.
Examples: []
crypto:
FNV32a:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - v
+ Description: 'FNV32a hashes v using fnv32a algorithm.\n<docsmeta>{"newIn": "0.98.0" }</docsmeta>'
+ Examples: []
HMAC:
Aliases:
- hmac
Examples: []
Quoted:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - v
+ Description: Quoted returns a string that needs to be quoted in CSS.
+ Examples: []
Sass:
Aliases:
- toCSS
Examples: []
TailwindCSS:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: TailwindCSS processes the given Resource with tailwindcss.
+ Examples: []
Unquoted:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - v
+ Description: Unquoted returns a string that does not need to be quoted in CSS.
+ Examples: []
data:
GetCSV:
Aliases:
Dump returns a object dump of val as a string.
Note that not every value passed to Dump will print so nicely, but
we'll improve on that.
-
+
We recommend using the "go" Chroma lexer to format the output
nicely.
-
+
Also note that the output from Dump may change from Hugo version to the next,
so don't depend on a specific output.
Examples:
- - - |-
- {{ $m := newScratch }}
- {{ $m.Set "Hugo" "Rocks!" }}
- {{ $m.Values | debug.Dump | safeHTML }}
- - |-
- {
- "Hugo": "Rocks!"
- }
+ - - '{{ $m := newScratch }}\n{{ $m.Set "Hugo" "Rocks!" }}\n{{ $m.Values | debug.Dump | safeHTML }}'
+ - '{\n "Hugo": "Rocks!"\n}'
TestDeprecationErr:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - item
+ - alternative
+ Description: Internal template func, used in tests only.
+ Examples: []
TestDeprecationInfo:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - item
+ - alternative
+ Description: Internal template func, used in tests only.
+ Examples: []
TestDeprecationWarn:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - item
+ - alternative
+ Description: Internal template func, used in tests only.
+ Examples: []
Timer:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - name
+ Description: ''
+ Examples: []
VisualizeSpaces:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - val
+ Description: VisualizeSpaces returns a string with spaces replaced by a visible string.
+ Examples: []
diagrams:
Goat:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - v
+ Description: Goat creates a new SVG diagram from input v.
+ Examples: []
encoding:
Base64Decode:
Aliases:
- - '{{ "SGVsbG8gd29ybGQ=" | base64Decode }}'
- Hello world
- - '{{ 42 | base64Encode | base64Decode }}'
- - "42"
+ - '42'
Base64Encode:
Aliases:
- base64Encode
- - '{{ (slice "A" "B" "C") | jsonify }}'
- '["A","B","C"]'
- - '{{ (slice "A" "B" "C") | jsonify (dict "indent" " ") }}'
- - |-
- [
- "A",
- "B",
- "C"
- ]
+ - '[\n "A",\n "B",\n "C"\n]'
fmt:
Errorf:
Aliases:
It returns an empty string.
Examples:
- - '{{ errorf "%s." "failed" }}'
- - ""
+ - ''
Erroridf:
Aliases:
- erroridf
It returns an empty string.
Examples:
- - '{{ erroridf "my-err-id" "%s." "failed" }}'
- - ""
+ - ''
Errormf:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - m
+ - format
+ - args
+ Description: Errormf is experimental and subject to change at any time.
+ Examples: []
Print:
Aliases:
- print
Args:
- format
- args
- Description: Printf returns string representation of args formatted with the
- layout in format.
+ Description: Printf returns string representation of args formatted with the layout in format.
Examples:
- - '{{ printf "%s!" "works" }}'
- works!
- println
Args:
- args
- Description: Println returns string representation of args ending with a
- newline.
+ Description: Println returns string representation of args ending with a newline.
Examples:
- - '{{ println "works!" }}'
- |
It returns an empty string.
Examples:
- - '{{ warnf "%s." "warning" }}'
- - ""
+ - ''
Warnidf:
Aliases:
- warnidf
It returns an empty string.
Examples:
- - '{{ warnidf "my-warn-id" "%s." "warning" }}'
- - ""
+ - ''
Warnmf:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - m
+ - format
+ - args
+ Description: Warnmf is experimental and subject to change at any time.
+ Examples: []
hash:
FNV32a:
Aliases: null
Description: FNV32a hashes v using fnv32a algorithm.
Examples:
- - '{{ hash.FNV32a "Hugo Rocks!!" }}'
- - "1515779328"
+ - '1515779328'
XxHash:
Aliases:
- xxhash
Deps:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Generator:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsDevelopment:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsExtended:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsMultiHost:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsMultihost:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsMultilingual:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsProduction:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsServer:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Store:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Version:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
WorkingDir:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
images:
AutoOrient:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Brightness:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
ColorBalance:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Colorize:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Config:
Aliases:
Contrast:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Dither:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Filter:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: Filter applies the given filters to the image given as the last element in args.
+ Examples: []
Gamma:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
GaussianBlur:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Grayscale:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Hue:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Invert:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Mask:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Opacity:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Overlay:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Padding:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Pixelate:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Process:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
QR:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: |-
+ QR encodes the given text into a QR code using the specified options,
+ returning an image resource.
+ Examples: []
Saturation:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Sepia:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Sigmoid:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Text:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
UnsharpMask:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
inflect:
Humanize:
- v
Description: |-
Humanize returns the humanized form of v.
-
+
If v is either an integer or a string containing an integer
value, the behavior is to add the appropriate ordinal.
Examples:
Examples: []
Batch:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - id
+ Description: |-
+ Batch creates a new Batcher with the given ID.
+ Repeated calls with the same ID will return the same Batcher.
+ The ID will be used to name the root directory of the batch.
+ Forward slashes in the ID is allowed.
+ Examples: []
Build:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: Build processes the given Resource with ESBuild.
+ Examples: []
lang:
FormatAccounting:
Aliases: null
Description: |-
FormatAccounting returns the currency representation of number for the given currency and precision
for the current language in accounting notation.
-
+
The return value is formatted with at least two decimal places.
Examples:
- - '{{ 512.5032 | lang.FormatAccounting 2 "NOK" }}'
Description: |-
FormatCurrency returns the currency representation of number for the given currency and precision
for the current language.
-
+
The return value is formatted with at least two decimal places.
Examples:
- - '{{ 512.5032 | lang.FormatCurrency 2 "USD" }}'
Args:
- precision
- number
- Description: FormatNumber formats number with the given precision for the
- current language.
+ Description: FormatNumber formats number with the given precision for the current language.
Examples:
- - '{{ 512.5032 | lang.FormatNumber 2 }}'
- - "512.50"
+ - '512.50'
FormatNumberCustom:
Aliases: null
Args:
- precision
- number
- options
- Description: |-
- FormatNumberCustom formats a number with the given precision. The first
- options parameter is a space-delimited string of characters to represent
- negativity, the decimal point, and grouping. The default value is `- . ,`.
- The second options parameter defines an alternate delimiting character.
-
- Note that numbers are rounded up at 5 or greater.
- So, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`.
-
- For a simpler function that adapts to the current language, see FormatNumber.
+ Description: 'FormatNumberCustom formats a number with the given precision. The first\noptions parameter is a space-delimited string of characters to represent\nnegativity, the decimal point, and grouping. The default value is `- . ,`.\nThe second options parameter defines an alternate delimiting character.\n\nNote that numbers are rounded up at 5 or greater.\nSo, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`.\n\nFor a simpler function that adapts to the current language, see FormatNumber.'
Examples:
- - '{{ lang.FormatNumberCustom 2 12345.6789 }}'
- 12,345.68
- - '{{ lang.FormatNumberCustom 2 12345.6789 "- , ." }}'
- 12.345,68
- - '{{ lang.FormatNumberCustom 6 -12345.6789 "- ." }}'
- - "-12345.678900"
+ - '-12345.678900'
- - '{{ lang.FormatNumberCustom 0 -12345.6789 "- . ," }}'
- -12,346
- - '{{ lang.FormatNumberCustom 0 -12345.6789 "-|.| " "|" }}'
- 512.50%
Merge:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - p2
+ - p1
+ Description: Merge creates a union of pages from two languages.
+ Examples: []
Translate:
Aliases:
- i18n
Abs:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Abs returns the absolute value of n.
Examples:
- - '{{ math.Abs -2.1 }}'
- - "2.1"
+ - '2.1'
Acos:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Acos returns the arccosine, in radians, of n.
Examples:
- - '{{ math.Acos 1 }}'
- - "0"
+ - '0'
Add:
Aliases:
- add
Description: Add adds the multivalued addends n1 and n2 or more values.
Examples:
- - '{{ add 1 2 }}'
- - "3"
+ - '3'
Asin:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Asin returns the arcsine, in radians, of n.
Examples:
- - '{{ math.Asin 1 }}'
- - "1.5707963267948966"
+ - '1.5707963267948966'
Atan:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Atan returns the arctangent, in radians, of n.
Examples:
- - '{{ math.Atan 1 }}'
- - "0.7853981633974483"
+ - '0.7853981633974483'
Atan2:
Aliases: null
Args:
- - "n"
+ - 'n'
- m
- Description: Atan2 returns the arc tangent of n/m, using the signs of the
- two to determine the quadrant of the return value.
+ Description: Atan2 returns the arc tangent of n/m, using the signs of the two to determine the quadrant of the return value.
Examples:
- - '{{ math.Atan2 1 2 }}'
- - "0.4636476090008061"
+ - '0.4636476090008061'
Ceil:
Aliases: null
Args:
- - "n"
- Description: Ceil returns the least integer value greater than or equal to
- n.
+ - 'n'
+ Description: Ceil returns the least integer value greater than or equal to n.
Examples:
- - '{{ math.Ceil 2.1 }}'
- - "3"
+ - '3'
Cos:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Cos returns the cosine of the radian argument n.
Examples:
- - '{{ math.Cos 1 }}'
- - "0.5403023058681398"
+ - '0.5403023058681398'
Counter:
Aliases: null
Args: null
- Description: ""
- Examples: null
+ Description: 'Counter increments and returns a global counter.\nThis was originally added to be used in tests where now.UnixNano did not\nhave the needed precision (especially on Windows).\nNote that given the parallel nature of Hugo, you cannot use this to get sequences of numbers,\nand the counter will reset on new builds.\n<docsmeta>{"identifiers": ["now.UnixNano"] }</docsmeta>'
+ Examples: []
Div:
Aliases:
- div
Description: Div divides n1 by n2.
Examples:
- - '{{ div 6 3 }}'
- - "2"
+ - '2'
Floor:
Aliases: null
Args:
- - "n"
- Description: Floor returns the greatest integer value less than or equal to
- n.
+ - 'n'
+ Description: Floor returns the greatest integer value less than or equal to n.
Examples:
- - '{{ math.Floor 1.9 }}'
- - "1"
+ - '1'
Log:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Log returns the natural logarithm of the number n.
Examples:
- - '{{ math.Log 1 }}'
- - "0"
+ - '0'
Max:
Aliases: null
Args:
- inputs
- Description: Max returns the greater of all numbers in inputs. Any slices
- in inputs are flattened.
+ Description: Max returns the greater of all numbers in inputs. Any slices in inputs are flattened.
Examples:
- - '{{ math.Max 1 2 }}'
- - "2"
+ - '2'
MaxInt64:
Aliases: null
Args: null
Description: MaxInt64 returns the maximum value for a signed 64-bit integer.
Examples:
- - '{{ math.MaxInt64 }}'
- - "9223372036854775807"
+ - '9223372036854775807'
Min:
Aliases: null
Args:
- inputs
- Description: Min returns the smaller of all numbers in inputs. Any slices
- in inputs are flattened.
+ Description: Min returns the smaller of all numbers in inputs. Any slices in inputs are flattened.
Examples:
- - '{{ math.Min 1 2 }}'
- - "1"
+ - '1'
Mod:
Aliases:
- mod
Description: Mod returns n1 % n2.
Examples:
- - '{{ mod 15 3 }}'
- - "0"
+ - '0'
ModBool:
Aliases:
- modBool
Args:
- n1
- n2
- Description: ModBool returns the boolean of n1 % n2. If n1 % n2 == 0, return
- true.
+ Description: ModBool returns the boolean of n1 % n2. If n1 % n2 == 0, return true.
Examples:
- - '{{ modBool 15 3 }}'
- - "true"
+ - 'true'
Mul:
Aliases:
- mul
Description: Mul multiplies the multivalued numbers n1 and n2 or more values.
Examples:
- - '{{ mul 2 3 }}'
- - "6"
+ - '6'
Pi:
Aliases: null
Args: null
Description: Pi returns the mathematical constant pi.
Examples:
- - '{{ math.Pi }}'
- - "3.141592653589793"
+ - '3.141592653589793'
Pow:
Aliases:
- pow
Description: Pow returns n1 raised to the power of n2.
Examples:
- - '{{ math.Pow 2 3 }}'
- - "8"
+ - '8'
Product:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - inputs
+ Description: Product returns the product of all numbers in inputs. Any slices in inputs are flattened.
+ Examples: []
Rand:
Aliases: null
Args: null
- Description: Rand returns, as a float64, a pseudo-random number in the half-open
- interval [0.0,1.0).
+ Description: Rand returns, as a float64, a pseudo-random number in the half-open interval [0.0,1.0).
Examples:
- - '{{ math.Rand }}'
- - "0.6312770459590062"
+ - '0.6312770459590062'
Round:
Aliases: null
Args:
- - "n"
- Description: Round returns the integer nearest to n, rounding half away from
- zero.
+ - 'n'
+ Description: Round returns the integer nearest to n, rounding half away from zero.
Examples:
- - '{{ math.Round 1.5 }}'
- - "2"
+ - '2'
Sin:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Sin returns the sine of the radian argument n.
Examples:
- - '{{ math.Sin 1 }}'
- - "0.8414709848078965"
+ - '0.8414709848078965'
Sqrt:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Sqrt returns the square root of the number n.
Examples:
- - '{{ math.Sqrt 81 }}'
- - "9"
+ - '9'
Sub:
Aliases:
- sub
Description: Sub subtracts multivalued.
Examples:
- - '{{ sub 3 2 }}'
- - "1"
+ - '1'
Sum:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - inputs
+ Description: Sum returns the sum of all numbers in inputs. Any slices in inputs are flattened.
+ Examples: []
Tan:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: Tan returns the tangent of the radian argument n.
Examples:
- - '{{ math.Tan 1 }}'
- - "1.557407724654902"
+ - '1.557407724654902'
ToDegrees:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: ToDegrees converts radians into degrees.
Examples:
- - '{{ math.ToDegrees 1.5707963267948966 }}'
- - "90"
+ - '90'
ToRadians:
Aliases: null
Args:
- - "n"
+ - 'n'
Description: ToRadians converts degrees into radians.
Examples:
- - '{{ math.ToRadians 90 }}'
- - "1.5707963267948966"
+ - '1.5707963267948966'
openapi3:
Unmarshal:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: []
os:
FileExists:
Description: FileExists checks whether a file exists under the given path.
Examples:
- - '{{ fileExists "foo.txt" }}'
- - "false"
+ - 'false'
Getenv:
Aliases:
- getenv
- readDir
Args:
- i
- Description: ReadDir lists the directory contents relative to the configured
- WorkingDir.
+ Description: ReadDir lists the directory contents relative to the configured WorkingDir.
Examples:
- - '{{ range (readDir "files") }}{{ .Name }}{{ end }}'
- README.txt
- Hugo Rocks!
Stat:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - i
+ Description: Stat returns the os.FileInfo structure describing file.
+ Examples: []
partials:
Include:
Aliases:
path:
Base:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - path
+ Description: |-
+ Base returns the last element of path.
+ Trailing slashes are removed before extracting the last element.
+ If the path is empty, Base returns ".".
+ If the path consists entirely of slashes, Base returns "/".
+ The input path is passed into filepath.ToSlash converting any Windows slashes
+ to forward slashes.
+ Examples: []
BaseName:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - path
+ Description: |-
+ BaseName returns the last element of path, removing the extension if present.
+ Trailing slashes are removed before extracting the last element.
+ If the path is empty, Base returns ".".
+ If the path consists entirely of slashes, Base returns "/".
+ The input path is passed into filepath.ToSlash converting any Windows slashes
+ to forward slashes.
+ Examples: []
Clean:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - path
+ Description: |-
+ Clean replaces the separators used with standard slashes and then
+ extraneous slashes are removed.
+ Examples: []
Dir:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - path
+ Description: |-
+ Dir returns all but the last element of path, typically the path's directory.
+ After dropping the final element using Split, the path is Cleaned and trailing
+ slashes are removed.
+ If the path is empty, Dir returns ".".
+ If the path consists entirely of slashes followed by non-slash bytes, Dir
+ returns a single slash. In any other case, the returned path does not end in a
+ slash.
+ The input path is passed into filepath.ToSlash converting any Windows slashes
+ to forward slashes.
+ Examples: []
Ext:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - path
+ Description: |-
+ Ext returns the file name extension used by path.
+ The extension is the suffix beginning at the final dot
+ in the final slash-separated element of path;
+ it is empty if there is no dot.
+ The input path is passed into filepath.ToSlash converting any Windows slashes
+ to forward slashes.
+ Examples: []
Join:
Aliases: null
Args:
- - '{{ "/my/path/filename.txt" | path.Split }}'
- /my/path/|filename.txt
reflect:
+ IsImageResource:
+ Aliases: null
+ Args: null
+ Description: ''
+ Examples: null
IsMap:
Aliases: null
Args:
Examples:
- - '{{ if reflect.IsMap (dict "a" 1) }}Map{{ end }}'
- Map
+ IsPage:
+ Aliases: null
+ Args: null
+ Description: ''
+ Examples: null
+ IsResource:
+ Aliases: null
+ Args: null
+ Description: ''
+ Examples: null
+ IsSite:
+ Aliases: null
+ Args: null
+ Description: ''
+ Examples: null
IsSlice:
Aliases: null
Args:
resources:
Babel:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: 'Babel processes the given Resource with Babel.\nDeprecated: Moved to the js namespace in Hugo 0.128.0.'
+ Examples: []
ByType:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - typ
+ Description: ByType returns resources of a given resource type (e.g. "image").
+ Examples: []
Concat:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - targetPathIn
+ - r
+ Description: |-
+ Concat concatenates a slice of Resource objects. These resources must
+ (currently) be of the same Media Type.
+ Examples: []
Copy:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - s
+ - r
+ Description: Copy copies r to the new targetPath in s.
+ Examples: []
ExecuteAsTemplate:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - ctx
+ - args
+ Description: |-
+ ExecuteAsTemplate creates a Resource from a Go template, parsed and executed with
+ the given data, and published to the relative target path.
+ Examples: []
Fingerprint:
Aliases:
- fingerprint
Examples: []
FromString:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - targetPathIn
+ - contentIn
+ Description: FromString creates a Resource from a string published to the relative target path.
+ Examples: []
Get:
Aliases: null
Args:
GetMatch:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
GetRemote:
Aliases: null
Args:
- args
- Description: |-
- GetRemote gets the URL (via HTTP(s)) in the first argument in args and creates Resource object that can be used for
- further transformations.
-
- A second argument may be provided with an option map.
-
- Note: This method does not return any error as a second return value,
- for any error situations the error can be checked in .Err.
+ Description: 'GetRemote gets the URL (via HTTP(s)) in the first argument in args and creates Resource object that can be used for\nfurther transformations.\n\nA second argument may be provided with an option map.\n\nNote: This method does not return any error as a second return value,\nfor any error situations the error can be checked in .Err.'
Examples: []
Match:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - pattern
+ Description: |-
+ Match gets all resources matching the given base path prefix, e.g
+ "*.png" will match all png files. The "*" does not match path delimiters (/),
+ so if you organize your resources in sub-folders, you need to be explicit about it, e.g.:
+ "images/*.png". To match any PNG image anywhere in the bundle you can do "**.png", and
+ to match all PNG images below the images folder, use "images/**.jpg".
+
+ The matching is case insensitive.
+
+ Match matches by using the files name with path relative to the file system root
+ with Unix style slashes (/) and no leading slash, e.g. "images/logo.png".
+
+ See https://github.com/gobwas/glob for the full rules set.
+
+ It looks for files in the assets file system.
+
+ See Match for a more complete explanation about the rules used.
+ Examples: []
Minify:
Aliases:
- minify
Examples: []
PostCSS:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: 'PostCSS processes the given Resource with PostCSS.\nDeprecated: Moved to the css namespace in Hugo 0.128.0.'
+ Examples: []
PostProcess:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - r
+ Description: PostProcess processes r after the build.
+ Examples: []
ToCSS:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - args
+ Description: 'ToCSS converts the given Resource to CSS. You can optional provide an Options object\nas second argument. As an option, you can e.g. specify e.g. the target path (string)\nfor the converted CSS resource.\nDeprecated: Moved to the css namespace in Hugo 0.128.0.'
+ Examples: []
safe:
CSS:
Aliases:
AllPages:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Author:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Authors:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
BaseURL:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
BuildDrafts:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
CheckReady:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Config:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Copyright:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Current:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Data:
Aliases: null
Args: null
- Description: ""
+ Description: ''
+ Examples: null
+ Dimension:
+ Aliases: null
+ Args: null
+ Description: ''
Examples: null
ForEeachIdentityByName:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
GetPage:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Home:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Hugo:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
IsMultiLingual:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Key:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Language:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
LanguageCode:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
LanguagePrefix:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Languages:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
LastChange:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Lastmod:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
MainSections:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Menus:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Pages:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Param:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Params:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
RegularPages:
Aliases: null
Args: null
- Description: ""
+ Description: ''
+ Examples: null
+ Role:
+ Aliases: null
+ Args: null
+ Description: ''
Examples: null
Sections:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
ServerPort:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Sites:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Social:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Store:
Aliases: null
Args: null
- Description: ""
+ Description: ''
+ Examples: null
+ String:
+ Aliases: null
+ Args: null
+ Description: ''
Examples: null
Taxonomies:
Aliases: null
Args: null
- Description: ""
+ Description: ''
Examples: null
Title:
Aliases: null
Args: null
- Description: ""
+ Description: ''
+ Examples: null
+ Version:
+ Aliases: null
+ Args: null
+ Description: ''
Examples: null
strings:
Chomp:
- chomp
Args:
- s
- Description: Chomp returns a copy of s with all trailing newline characters
- removed.
+ Description: Chomp returns a copy of s with all trailing newline characters removed.
Examples:
- - '{{ chomp "<p>Blockhead</p>\n" | safeHTML }}'
- <p>Blockhead</p>
Description: Contains reports whether substr is in s.
Examples:
- - '{{ strings.Contains "abc" "b" }}'
- - "true"
+ - 'true'
- - '{{ strings.Contains "abc" "d" }}'
- - "false"
+ - 'false'
ContainsAny:
Aliases: null
Args:
- s
- chars
- Description: ContainsAny reports whether any Unicode code points in chars
- are within s.
+ Description: ContainsAny reports whether any Unicode code points in chars are within s.
Examples:
- - '{{ strings.ContainsAny "abc" "bcd" }}'
- - "true"
+ - 'true'
- - '{{ strings.ContainsAny "abc" "def" }}'
- - "false"
+ - 'false'
ContainsNonSpace:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - s
+ Description: 'ContainsNonSpace reports whether s contains any non-space characters as defined\nby Unicode''s White Space property,\n<docsmeta>{"newIn": "0.111.0" }</docsmeta>'
+ Examples: []
Count:
Aliases: null
Args:
If substr is an empty string, Count returns 1 + the number of Unicode code points in s.
Examples:
- - '{{ "aabab" | strings.Count "a" }}'
- - "3"
+ - '3'
CountRunes:
Aliases:
- countrunes
Examples: []
Diff:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - oldname
+ - old
+ - newname
+ - new
+ Description: |-
+ Diff returns an anchored diff of the two texts old and new in the “unified
+ diff” format. If old and new are identical, Diff returns an empty string.
+ Examples: []
FindRE:
Aliases:
- findRE
FindRE returns a list of strings that match the regular expression. By default all matches
will be included. The number of matches can be limited with an optional third parameter.
Examples:
- - - '{{ findRE "[G|g]o" "Hugo is a static side generator written in Go." 1
- }}'
+ - - '{{ findRE "[G|g]o" "Hugo is a static side generator written in Go." 1 }}'
- '[go]'
FindRESubmatch:
Aliases:
expression in content. Each element is a slice of strings holding the text
of the leftmost match of the regular expression and the matches, if any, of
its subexpressions.
-
+
By default all matches will be included. The number of matches can be
limited with the optional limit parameter. A return value of nil indicates
no match.
Examples:
- - - '{{ findRESubmatch `<a\s*href="(.+?)">(.+?)</a>` `<li><a href="#foo">Foo</a></li>
- <li><a href="#bar">Bar</a></li>` | print | safeHTML }}'
+ - - '{{ findRESubmatch `<a\s*href="(.+?)">(.+?)</a>` `<li><a href="#foo">Foo</a></li> <li><a href="#bar">Bar</a></li>` | print | safeHTML }}'
- '[[<a href="#foo">Foo</a> #foo Foo] [<a href="#bar">Bar</a> #bar Bar]]'
FirstUpper:
Aliases: null
Description: HasPrefix tests whether the input s begins with prefix.
Examples:
- - '{{ hasPrefix "Hugo" "Hu" }}'
- - "true"
+ - 'true'
- - '{{ hasPrefix "Hugo" "Fu" }}'
- - "false"
+ - 'false'
HasSuffix:
Aliases:
- hasSuffix
Description: HasSuffix tests whether the input s begins with suffix.
Examples:
- - '{{ hasSuffix "Hugo" "go" }}'
- - "true"
+ - 'true'
- - '{{ hasSuffix "Hugo" "du" }}'
- - "false"
+ - 'false'
Repeat:
Aliases: null
Args:
- - "n"
+ - 'n'
- s
- Description: Repeat returns a new string consisting of n copies of the string
- s.
+ Description: Repeat returns a new string consisting of n copies of the string s.
Examples:
- - '{{ "yo" | strings.Repeat 4 }}'
- yoyoyoyo
- pattern
- repl
- s
- - "n"
+ - 'n'
Description: |-
ReplaceRE returns a copy of s, replacing all matches of the regular
expression pattern with the replacement text repl. The number of replacements
Args:
- a
- delimiter
- Description: Split slices an input string into all substrings separated by
- delimiter.
+ Description: Split slices an input string into all substrings separated by delimiter.
Examples: []
Substr:
Aliases:
Args:
- a
- nums
- Description: |-
- Substr extracts parts of a string, beginning at the character at the specified
- position, and returns the specified number of characters.
-
- It normally takes two parameters: start and length.
- It can also take one parameter: start, i.e. length is omitted, in which case
- the substring starting from start until the end of the string will be returned.
-
- To extract characters from the end of the string, use a negative start number.
-
- In addition, borrowing from the extended behavior described at http://php.net/substr,
- if length is given and is negative, then that many characters will be omitted from
- the end of string.
+ Description: 'Substr extracts parts of a string, beginning at the character at the specified\nposition, and returns the specified number of characters.\n\nIt normally takes two parameters: start and length.\nIt can also take one parameter: start, i.e. length is omitted, in which case\nthe substring starting from start until the end of the string will be returned.\n\nTo extract characters from the end of the string, use a negative start number.\n\nIn addition, borrowing from the extended behavior described at http://php.net/substr,\nif length is given and is negative, then that many characters will be omitted from\nthe end of string.'
Examples:
- - '{{ substr "BatMan" 0 -3 }}'
- Bat
- aabb
TrimSpace:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - s
+ Description: |-
+ TrimSpace returns the given string, removing leading and trailing whitespace
+ as defined by Unicode.
+ Examples: []
TrimSuffix:
Aliases: null
Args:
templates:
Current:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - ctx
+ Description: Get information about the currently executing template.
+ Examples: []
Defer:
Aliases: null
Args:
Note that this is the Unix-styled relative path including filename suffix,
e.g. partials/header.html
Examples:
- - - '{{ if (templates.Exists "partials/header.html") }}Yes!{{ end }}'
+ - - '{{ if (templates.Exists "_partials/header.html") }}Yes!{{ end }}'
- Yes!
- - - '{{ if not (templates.Exists "partials/doesnotexist.html") }}No!{{ end
- }}'
+ - - '{{ if not (templates.Exists "_partials/doesnotexist.html") }}No!{{ end }}'
- No!
+ Inner:
+ Aliases:
+ - inner
+ Args:
+ - ctx
+ - data
+ Description: |-
+ Inner executes the inner content of a partial decorator.
+ Note that there is only one inner block per partial decorator, but inner may be called multiple times with, typically, different data.
+ Examples: []
time:
AsTime:
Aliases: null
a time.Time interface.
Examples:
- - '{{ (time "2015-01-21").Year }}'
- - "2015"
+ - '2015'
Duration:
Aliases:
- duration
- 'dateFormat: Wednesday, Jan 21, 2015'
In:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - timeZoneName
+ - t
+ Description: |-
+ In returns the time t in the IANA time zone specified by timeZoneName.
+ If timeZoneName is "" or "UTC", the time is returned in UTC.
+ If timeZoneName is "Local", the time is returned in the system's local time zone.
+ Otherwise, timeZoneName must be a valid IANA location name (e.g., "Europe/Oslo").
+ Examples: []
Now:
Aliases:
- now
Aliases: null
Args:
- s
- Description: |-
- ParseDuration parses the duration string s.
- A duration string is a possibly signed sequence of
- decimal numbers, each with optional fraction and a unit suffix,
- such as "300ms", "-1.5h" or "2h45m".
- Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
- See https://golang.org/pkg/time/#ParseDuration
+ Description: 'ParseDuration parses the duration string s.\nA duration string is a possibly signed sequence of\ndecimal numbers, each with optional fraction and a unit suffix,\nsuch as "300ms", "-1.5h" or "2h45m".\nValid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".\nSee https://golang.org/pkg/time/#ParseDuration'
Examples:
- - '{{ "1h12m10s" | time.ParseDuration }}'
- 1h12m10s
transform:
CanHighlight:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - language
+ Description: CanHighlight returns whether the given code language is supported by the Chroma highlighter.
+ Examples: []
Emojify:
Aliases:
- emojify
- s
Description: |-
Emojify returns a copy of s with all emoji codes replaced with actual emojis.
-
+
See http://www.emoji-cheat-sheet.com/
Examples:
- - '{{ "I :heart: Hugo" | emojify }}'
- htmlEscape
Args:
- s
- Description: HTMLEscape returns a copy of s with reserved HTML characters
- escaped.
+ Description: HTMLEscape returns a copy of s with reserved HTML characters escaped.
Examples:
- - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" |
- safeHTML }}'
+ - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | safeHTML }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
- - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" }}'
- Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;
- - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" |
- htmlUnescape | safeHTML }}'
+ - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | htmlUnescape | safeHTML }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
+ HTMLToMarkdown:
+ Aliases: null
+ Args:
+ - ctx
+ - args
+ Description: |-
+ This was added in Hugo v0.151.0 and should be considered experimental for now.
+ We need to test this out in the wild for a while before committing to this API,
+ and there will eventually be more options here.
+ Examples: []
HTMLUnescape:
Aliases:
- htmlUnescape
HTMLUnescape returns a copy of s with HTML escape requences converted to plain
text.
Examples:
- - - '{{ htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>"
- | safeHTML }}'
+ - - '{{ htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | safeHTML }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
- - - '{{ "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;"
- | htmlUnescape | htmlUnescape | safeHTML }}'
+ - - '{{ "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;" | htmlUnescape | htmlUnescape | safeHTML }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
- - - '{{ "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;"
- | htmlUnescape | htmlUnescape }}'
+ - - '{{ "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;" | htmlUnescape | htmlUnescape }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
- - - '{{ htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>"
- | htmlEscape | safeHTML }}'
+ - - '{{ htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | htmlEscape | safeHTML }}'
- Cathal Garvey & The Sunshine Band <cathal@foo.bar>
Highlight:
Aliases:
Examples: []
HighlightCodeBlock:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - ctx
+ - opts
+ Description: HighlightCodeBlock highlights a code block on the form received in the codeblock render hooks.
+ Examples: []
Markdownify:
Aliases:
- markdownify
- Hello world, gophers!
PortableText:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - v
+ Description: |-
+ PortableText converts the portable text in v to Markdown.
+ We may add more options in the future.
+ Examples: []
Remarshal:
Aliases: null
Args:
change without notice if it serves a purpose in the docs.
Format is one of json, yaml or toml.
Examples:
- - - '{{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML
- }}'
- - |
- {
- "title": "Hello World"
- }
+ - - '{{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML }}'
+ - '{\n "title": "Hello World"\n}\n'
ToMath:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - ctx
+ - args
+ Description: |-
+ ToMath converts a LaTeX string to math in the given format, default MathML.
+ This uses KaTeX to render the math, see https://katex.org/.
+ Examples: []
Unmarshal:
Aliases:
- unmarshal
Examples:
- - '{{ "hello = \"Hello World\"" | transform.Unmarshal }}'
- map[hello:Hello World]
- - - '{{ "hello = \"Hello World\"" | resources.FromString "data/greetings.toml"
- | transform.Unmarshal }}'
+ - - '{{ "hello = \"Hello World\"" | resources.FromString "data/greetings.toml" | transform.Unmarshal }}'
- map[hello:Hello World]
XMLEscape:
Aliases: null
- a/b
Parse:
Aliases: null
- Args: null
- Description: ""
- Examples: null
+ Args:
+ - rawurl
+ Description: |-
+ Parse parses rawurl into a URL structure. The rawurl may be relative or
+ absolute.
+ Examples: []
+ PathEscape:
+ Aliases: null
+ Args:
+ - s
+ Description: |-
+ PathEscape returns the given string, applying percent-encoding to special
+ characters and reserved delimiters so it can be safely used as a segment
+ within a URL path.
+ Examples: []
+ PathUnescape:
+ Aliases: null
+ Args:
+ - s
+ Description: |-
+ PathUnescape returns the given string, replacing all percent-encoded
+ sequences with the corresponding unescaped characters.
+ Examples: []
Ref:
Aliases:
- ref
Args:
- p
- args
- Description: Ref returns the absolute URL path to a given content item from
- Page p.
+ Description: Ref returns the absolute URL path to a given content item from Page p.
Examples: []
RelLangURL:
Aliases:
Args:
- p
- args
- Description: RelRef returns the relative URL path to a given content item
- from Page p.
+ Description: RelRef returns the relative URL path to a given content item from Page p.
Examples: []
RelURL:
Aliases: