mirror of https://github.com/gohugoio/hugo
822 B
822 B
title | description | categories | keywords | params | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Page | Returns the Page object from which the shortcode was called. |
|
With this content:
{{< code-toggle file=content/books/les-miserables.md fm=true >}} title = 'Les Misérables' author = 'Victor Hugo' publication_year = 1862 isbn = '978-0451419439' {{< /code-toggle >}}
Calling this shortcode:
{{</* book-details */>}}
We can access the front matter values using the Page
method:
<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>