24 lines
		
	
	
	
		
			808 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			808 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{ $images := $.Resources.ByType "image" }}
 | 
						|
{{ $featured := $images.GetMatch "*feature*" }}
 | 
						|
{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
 | 
						|
{{ if not $featured }}
 | 
						|
    {{ $featured = resources.Get "/opengraph/background.png" }}
 | 
						|
    {{ $size := 60 }}
 | 
						|
    {{ $title := $.LinkTitle }}
 | 
						|
    {{ if gt (len $title) 20 }}
 | 
						|
    {{ $size = 50 }}
 | 
						|
    {{ end }}
 | 
						|
 | 
						|
    {{ $text := $title }}
 | 
						|
                {{ $textOptions := dict
 | 
						|
                    "color" "#221F5F"
 | 
						|
                    "size" $size
 | 
						|
                    "lineSpacing" 10
 | 
						|
                    "x" 45 "y" 140
 | 
						|
                    "font" (resources.Get "/opengraph/mulish-black.ttf")
 | 
						|
                }}
 | 
						|
 | 
						|
    {{ $featured = $featured | images.Filter (images.Text $text $textOptions) }}
 | 
						|
{{ end }}
 | 
						|
 | 
						|
{{ return $featured }}
 |