Skip to content

Commit a94bee4

Browse files
committed
Use restaurant food photos for social media sharing
1 parent af5bf89 commit a94bee4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

html/base.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@
1212
<meta property="og:description" content="{{ description }}" />
1313
<meta name="twitter:description" content="{{ description }}" />
1414

15+
{% if food_image_path %}
16+
<meta property="og:image" content="{{ SITE_URL }}{{ food_image_path.replace('.webp', '.jpg') if food_image_path.endswith('.webp') else food_image_path }}" />
17+
<meta name="twitter:image" content="{{ SITE_URL }}{{ food_image_path.replace('.webp', '.jpg') if food_image_path.endswith('.webp') else food_image_path }}" />
18+
<meta property="og:image:width" content="1200" />
19+
<meta property="og:image:height" content="675" />
20+
<meta property="og:image:alt" content="{{ alt_text if alt_text else 'Vegan food at ' + name if name else 'Delicious vegan food from VILF' }}" />
21+
{% else %}
1522
<meta property="og:image" content="{{ SITE_URL }}/vilf_share_image.png" />
1623
<meta name="twitter:image" content="{{ SITE_URL }}/vilf_share_image.png" />
24+
{% endif %}
1725

1826
<meta property="og:type" content="website" />
1927
<meta name="twitter:card" content="summary_large_image" />

0 commit comments

Comments
 (0)