Files
hugo/content/functions/param.md
T
2017-03-27 16:32:31 -05:00

806 B

title, linktitle, description, godocref, date, publishdate, lastmod, tags, categories, toc, ns, signature, workson, hugoversion, relatedfuncs, deprecated, draft, aliases, wip
title linktitle description godocref date publishdate lastmod tags categories toc ns signature workson hugoversion relatedfuncs deprecated draft aliases wip
param Param Calls page or site variables into your template. 2017-02-01 2017-02-01 2017-02-01
functions
Param KEY
false false
true

In Hugo, you can declare site-wide params (i.e. in your configuration), as well as params for individual pages.

A common use case is to have a general value for the site and a more specific value for some of the pages (e.g., an image).

You can use the .Param method to call these values into your template:

$.Param "image"