From 40ba83c263755c7f2cb817dc9a324bbaafd28797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 23 May 2020 13:46:52 +0200 Subject: [PATCH] Update site.md Mention the site function See #1119 --- content/en/variables/site.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/variables/site.md b/content/en/variables/site.md index 7d663b96b..9fc6c49a0 100644 --- a/content/en/variables/site.md +++ b/content/en/variables/site.md @@ -20,6 +20,10 @@ toc: true The following is a list of site-level (aka "global") variables. Many of these variables are defined in your site's [configuration file][config], whereas others are built into Hugo's core for convenient usage in your templates. +## Get the Site object from a partial + +All the methods below, e.g. `.Site.RegularPages` can also be reached via the global `site` function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available. {{< new-in "0.53.0" >}}. + ## Site Variables List .Site.AllPages