mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
---
|
||||
title: GetPage
|
||||
description: Returns a Page object from the given path.
|
||||
description: Returns a Page object from the given path.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/site/GetPage
|
||||
returnType: page.Page
|
||||
signatures: [PAGE.GetPage PATH]
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: page.Page
|
||||
signatures: [PAGE.GetPage PATH]
|
||||
aliases: [/functions/getpage]
|
||||
---
|
||||
|
||||
@@ -38,7 +37,7 @@ content/
|
||||
|
||||
The examples below depict the result of rendering works/paintings/the-mona-lisa.md:
|
||||
|
||||
{{< code file=layouts/works/single.html >}}
|
||||
```go-html-template {file="layouts/works/single.html"}
|
||||
{{ with .GetPage "starry-night" }}
|
||||
{{ .Title }} → Starry Night
|
||||
{{ end }}
|
||||
@@ -62,4 +61,4 @@ The examples below depict the result of rendering works/paintings/the-mona-lisa.
|
||||
{{ with .GetPage "/works/sculptures/david" }}
|
||||
{{ .Title }} → David
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
```
|
||||
|
Reference in New Issue
Block a user