preview pics for sections

This commit is contained in:
generall
2023-08-20 23:57:12 +02:00
parent b7990e3639
commit 0d5f872752
17 changed files with 15 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 KiB

@@ -148,6 +148,21 @@
{{ $preview_image_base := path.Join .Dir .ContentBaseName }}
{{ $preview_image := printf "%s-social-preview.png" $preview_image_base }}
{{ $image = $preview_image }}
{{ else }}
<!-- If there are no image for document, check preview for the section -->
{{ $preview_image_section_base := path.Join "static" .File.Dir }}
{{ $preview_image_section := path.Join $preview_image_section_base "social-preview.png" }}
{{ $preview_image_section_exists := fileExists $preview_image_section }}
{{ if $preview_image_section_exists }}
{{ $preview_image_section_base := path.Join .Dir }}
{{ $preview_image_section := path.Join $preview_image_section_base "social-preview.png" }}
{{ $image = $preview_image_section }}
{{ end }}
{{ end }}
{{ end }}