From 65beca13b0dc448739b63276d987f9feb9152dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 12 Oct 2015 06:00:58 +0200 Subject: [PATCH] Add Param to the docs See #1462 --- docs/content/templates/variables.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md index 8152dba6f..5d7b1522e 100644 --- a/docs/content/templates/variables.md +++ b/docs/content/templates/variables.md @@ -65,6 +65,15 @@ Take for example I'm using *tags* and *categories* as my taxonomies. The followi **All Params are only accessible using all lowercase characters.** +### Param method +In Hugo you can declare params both for the site and the individual page. A common use case is to have a general value for the site and a more specificy value for some of the pages (i.e. an image). + +With the `Param` method the most specific value will be selected for you, and it is safe to use it in any template (it's defined on both Page and Node): + +``` +$.Param("image") +``` + ## Node Variables In Hugo, a node is any page not rendered directly by a content file. This includes taxonomies, lists and the homepage.