Parses the image and returns the height, width, and color model.
en savoir plus »
.Param
Appelle des variables de page ou site à l’intérieur de votre modèle.
en savoir plus »
.Unix
.Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC.
en savoir plus »
Math
Hugo provides six mathematical operators in templates.
en savoir plus »
apply
Given a map, array, or slice,
apply returns a new slice with a function applied over it.
en savoir plus »
base64
base64Encode and base64Decode let you easily decode content with a base64 encoding and vice versa through pipes.
en savoir plus »
chomp
Removes any trailing newline characters.
en savoir plus »
default
Allows setting a default value that can be returned if a first value is not set.
en savoir plus »
delimit
Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
en savoir plus »
dict
Creates a dictionary from a list of key and value pairs.
en savoir plus »
echoParam
Prints a parameter if it is set.
en savoir plus »
emojify
Lance une chaîne dans le processeur d’émoticônes Emoji.
en savoir plus »
eq
Returns true if the parameters are equal.
en savoir plus »
findRE
Returns a list of strings that match the regular expression.
en savoir plus »
first
Slices an array to only the first N elements.
en savoir plus »
getenv
Returns the value of an environment variable.
en savoir plus »
hasprefix
Tests whether a string begins with prefix.
en savoir plus »
htmlEscape
Returns the given string with the reserved HTML codes escaped.
en savoir plus »
htmlUnescape
Returns the given string with HTML escape codes un-escaped.
en savoir plus »
humanize
Returns the humanized version of an argument with the first letter capitalized.
en savoir plus »
i18n
Traduit un morceau de contenu basé sur vos fichiers de configuration i18n.
en savoir plus »
in
Checks if an element is in an array or slice–or a substring in a string—and returns a boolean.
en savoir plus »
index
Looks up the index(es) or key(s) of the data structure passed into it.
en savoir plus »
int
Creates an
int from the argument passed into the function.
en savoir plus »
intersect
Returns the common elements of two arrays or slices.
en savoir plus »
isset
Renvoie true si le paramètre est défini.
en savoir plus »
jsonify
Encodes a given object to JSON.
en savoir plus »
lang.NumFmt
Formats a number with a given precision using the requested
decimal, grouping, and negative characters.
en savoir plus »
last
slices an array to only the last Nth elements.
en savoir plus »
len
Returns the length of a variable according to its type.
en savoir plus »
lower
Converts all characters in the provided string to lowercase.
en savoir plus »
markdownify
Runs the provided string through the Markdown processor.
en savoir plus »
md5
hashes the given input and returns its MD5 checksum.
en savoir plus »
now
Returns the current local time
en savoir plus »
partialCached
Allows for caching of partials that do not need to be re-rendered on every invocation.
en savoir plus »
plainify
Strips any HTML and returns the plain text version of the provided string.
en savoir plus »
pluralize
Pluralizes the given word according to a set of common English pluralization rules
en savoir plus »
querify
Takes a set of key-value pairs and returns a query string to be appended to URLs.
en savoir plus »
readDir
Gets a directory listing from a directory relative to the current working directory.
en savoir plus »
readFile
Reads a file from disk relative to the current project working directory and returns a string.
en savoir plus »
ref
Looks up a content page by logical name.
en savoir plus »
relLangURL
Adds the relative URL with correct language prefix according to site configuration for multilingual.
en savoir plus »
relURL
Given a string, prepends the relative URL according to a page’s position in the project directory structure.
en savoir plus »
relref
Looks up a content page by relative path.
en savoir plus »
render
Takes a view to apply when rendering content.
en savoir plus »
replace
Replaces all occurrences of the search string with the replacement string.
en savoir plus »
replaceRE
remplace toutes les occurrences d’une expression régulière avec le modèle de remplacemenet.
en savoir plus »
safeCSS
Declares the provided string as a known “safe” CSS string.
en savoir plus »
safeHTML
Declares a provided string as a “safe” HTML document to avoid escaping by Go templates.
en savoir plus »
safeHTMLAttr
Declares the provided string as a safe HTML attribute.
en savoir plus »
safeJS
Declares the provided string as a known safe JavaScript string.
en savoir plus »
safeURL
Declares the provided string as a safe URL or URL substring.
en savoir plus »
seq
Creates a sequence of integers.
en savoir plus »
sha
Hashes the given input and returns either an SHA1 or SHA256 checksum.
en savoir plus »
shuffle
Returns a random permutation of a given array or slice.
en savoir plus »
singularize
Converts a word according to a set of common English singularization rules.
en savoir plus »
slice
Creates a alice (array) of all passed arguments.
en savoir plus »
slicestr
Creates a slice of a half-open range, including start and end indices.
en savoir plus »
sort
Sorts maps, arrays, and slices and returns a sorted slice.
en savoir plus »
split
splits a string into substrings separated by a delimiter
en savoir plus »
string
Creates a string from the argument passed to the function
en savoir plus »
substr
Extracts parts of a string from a specified character’s position and returns the specified number of characters.
en savoir plus »
trim
Returns a slice of a passed string with all leading and trailing characters from cutset removed.
en savoir plus »
truncate
Truncates a text to a max length without cutting words or leaving unclosed HTML tags.
en savoir plus »
union
Given two arrays or slices, returns a new array that contains the elements or objects that belong to either or both arrays/slices.
en savoir plus »
uniq
Takes in a slice or array and returns a slice with subsequent duplicate elements removed.
en savoir plus »
upper
Converts all characters in a string to uppercase
en savoir plus »
urlize
Takes a string, sanitizes it for usage in URLs, and converts spaces to hyphens.
en savoir plus »