mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
This commit is contained in:
@@ -126,9 +126,9 @@ Only one `return` statement is allowed per partial file.
|
||||
You can also define partials inline in the template. But remember that template namespace is global, so you need to make sure that the names are unique to avoid conflicts.
|
||||
|
||||
```go-html-template
|
||||
Value: {{ partial "my-inline-partial" . }}
|
||||
Value: {{ partial "my-inline-partial.html" . }}
|
||||
|
||||
{{ define "partials/my-inline-partial" }}
|
||||
{{ define "partials/my-inline-partial.html" }}
|
||||
{{ $value := 32 }}
|
||||
{{ return $value }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user