refactor: image handling logic + support for external images (#1235)
* refactor: simplify image partial logic, remove generation of different image sizes * Remove `defaultImage.opengraph` configuration from `params.toml`.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{- if $image.exists -}}
|
||||
{{ $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) }}
|
||||
{{- if $image -}}
|
||||
<meta property='og:image' content='{{ absURL $image.permalink }}' />
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user