]> git.maquefel.me Git - brevno-suite/hugo/commit
tpl: Allow using page resources on the images page parameter for `opengraph`, `schema...
authorRazon Yang <razonyang@gmail.com>
Mon, 4 Dec 2023 11:05:41 +0000 (19:05 +0800)
committerGitHub <noreply@github.com>
Mon, 4 Dec 2023 11:05:41 +0000 (12:05 +0100)
commit14d85ec136413dcfc96ad8e4d31633f8f9cbf410
tree24fb956c14c7e075dad9223587cc0aef0a63a0b5
parent171836cdfae7e9697fddafe262c46b9448bcb98e
tpl: Allow using page resources on the images page parameter for `opengraph`, `schema` and `twitter_cards` templates

The page images selection order as follows:

1. Page's images parameter, image resources are supported.
2. Page's image resources that naming in *feature*, *cover* or *thumbnail* pattern.
3. If no page images specified, then the first one of site's images will be used as the fallback, supports site resources.
hugolib/embedded_templates_test.go
tpl/tplimpl/embedded/templates/opengraph.html
tpl/tplimpl/embedded/templates/partials/_funcs/get-page-images.html [new file with mode: 0644]
tpl/tplimpl/embedded/templates/schema.html
tpl/tplimpl/embedded/templates/twitter_cards.html
tpl/tplimpl/template.go