Use highlight as og:image if present

This commit is contained in:
Paul Gauthier 2024-05-06 16:21:22 -07:00
parent eab864c518
commit 64938eafee
3 changed files with 9 additions and 2 deletions

View file

@ -3,8 +3,12 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
{% seo %} {% seo %}
<meta property="og:image" content="{{ site.url }}/assets/aider.jpg"> {% if post.highlight_image %}
<meta property="og:image" content="{{ site.url }}/assets/aider.jpg">
{% else %}
<meta property="og:image" content="{{ site.baseurl }}{{ post.highlight_image }}">
{% endif %}
<meta property="twitter:image" content="{{ site.url }}/assets/aider-square.jpg"> <meta property="twitter:image" content="{{ site.url }}/assets/aider-square.jpg">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin> <link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>

BIN
assets/leaderboard.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

View file

@ -1,3 +1,6 @@
---
highlight_image: /assets/leaderboard.jpg
---
# Aider LLM leaderboards # Aider LLM leaderboards