mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Merge commit '35febb2e2a3780c3338a2665fddea7dda28a17f4'
This commit is contained in:
@@ -24,7 +24,7 @@ deprecated: false
|
||||
|
||||
A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes.
|
||||
|
||||
The function is particulary handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
|
||||
The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
|
||||
|
||||
```go-html-template
|
||||
{{ $partialPath := printf "headers/%s.html" .Type }}
|
||||
@@ -34,4 +34,4 @@ The function is particulary handy with dynamic path. The following example ensur
|
||||
{{ partial "headers/default.html" . }}
|
||||
{{ end }}
|
||||
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user