preview pics for sections
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 951 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 790 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 794 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 857 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 978 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
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 }}
|
||||
|
||||
|
||||