mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
This commit is contained in:
@@ -61,13 +61,13 @@ When developing a [homepage][], what does one of the pages you're looping throug
|
||||
Check that you are passing variables in the `partial` function:
|
||||
|
||||
```
|
||||
{{ partial "header" }}
|
||||
{{ partial "header.html" }}
|
||||
```
|
||||
|
||||
This example will render the header partial, but the header partial will not have access to any contextual variables. You need to pass variables explicitly. For example, note the addition of ["the dot"][tempintro].
|
||||
|
||||
```
|
||||
{{ partial "header" . }}
|
||||
{{ partial "header.html" . }}
|
||||
```
|
||||
|
||||
The dot (`.`) is considered fundamental to understanding Hugo templating. For more information, see [Introduction to Hugo Templating][tempintro].
|
||||
|
Reference in New Issue
Block a user