mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-02 19:52:38 +00:00
823 B
823 B
title, description, categories, keywords, action
| title | description | categories | keywords | action | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 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' published = 1862 isbn = '978-0451419439' {{< /code-toggle >}}
Calling this shortcode:
{{</* book-details */>}}
We can access the front matter values using the Page method:
{{< code file="layouts/shortcodes/book-details.html" lang=go-html-template >}}
- Title: {{ .Page.Title }}
- Author: {{ .Page.Params.author }}
- Published: {{ .Page.Params.publication_year }}
- ISBN: {{ .Page.Params.isbn }}