projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ab4162
)
Add debugging steps for no variables defined
author
Daniel Compton
<desk@danielcompton.net>
Sat, 12 Mar 2016 08:44:50 +0000
(21:44 +1300)
committer
Daniel Compton
<desk@danielcompton.net>
Sat, 12 Mar 2016 08:44:50 +0000
(21:44 +1300)
docs/content/templates/debugging.md
patch
|
blob
|
history
diff --git
a/docs/content/templates/debugging.md
b/docs/content/templates/debugging.md
index dac00540e8a1235ae5b226e6c0be54ee1f6f4311..c9af2a3ce8107e44bbb932ef25d573038dce974a 100644
(file)
--- 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" . }}
+```