mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -3,10 +3,10 @@ title: Page
|
||||
description: Returns the Page object from which the shortcode was called.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related: []
|
||||
returnType: hugolib.pageForShortcode
|
||||
signatures: [SHORTCODE.Page]
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: hugolib.pageForShortcode
|
||||
signatures: [SHORTCODE.Page]
|
||||
---
|
||||
|
||||
With this content:
|
||||
@@ -26,11 +26,11 @@ Calling this shortcode:
|
||||
|
||||
We can access the front matter values using the `Page` method:
|
||||
|
||||
{{< code file=layouts/shortcodes/book-details.html >}}
|
||||
```go-html-template {file="layouts/shortcodes/book-details.html"}
|
||||
<ul>
|
||||
<li>Title: {{ .Page.Title }}</li>
|
||||
<li>Author: {{ .Page.Params.author }}</li>
|
||||
<li>Published: {{ .Page.Params.publication_year }}</li>
|
||||
<li>ISBN: {{ .Page.Params.isbn }}</li>
|
||||
</ul>
|
||||
{{< /code >}}
|
||||
```
|
||||
|
Reference in New Issue
Block a user