From: Daniel Compton Date: Sat, 12 Mar 2016 08:44:50 +0000 (+1300) Subject: Add debugging steps for no variables defined X-Git-Tag: v0.16~251 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=153dccc0;p=brevno-suite%2Fhugo Add debugging steps for no variables defined --- diff --git a/docs/content/templates/debugging.md b/docs/content/templates/debugging.md index dac00540..c9af2a3c 100644 --- a/docs/content/templates/debugging.md +++ b/docs/content/templates/debugging.md @@ -54,3 +54,17 @@ you're looping through look like? {{ printf "%#v" . }} {{ end }} ``` + +### Why do I have no variables defined? + +Check that you are passing variables in the `partial` function. For example + +``` +{{ partial "header" }} +``` + +will render the header partial, but the header partial will not have access to any variables. You need to pass variables explicitly. For example: + +``` +{{ partial "header" . }} +```