Skip to content

Commit

Permalink
Added Twitter square images.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaanavD committed Apr 24, 2024
1 parent 24544f4 commit 608603e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/routes/blogs/accelerating-phi-3/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ authorsLink:
[
]
image: 'https://iili.io/JSQDdog.png'
imageSquare: 'https://iili.io/JSDovQn.png'
url: 'https://onnxruntime.ai/blogs/accelerating-phi-3'
---

Expand Down
10 changes: 7 additions & 3 deletions src/routes/blogs/post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
/**
* @type {string}
*/
export let imageSquare;
/**
* @type {string}
*/
</script>

<svelte:head>
Expand All @@ -61,8 +65,8 @@
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="image" content={image} />
<meta name="og:image" content={image} />
<meta name="twitter:card" content={image} />
<meta name="og:image" content={imageSquare ? imageSquare : image} />
<meta name="twitter:card" content={imageSquare ? imageSquare : image} />
<meta name="twitter:image" content={image} />
<meta name="robots" content={robots} />
</svelte:head>
Expand All @@ -74,7 +78,7 @@
{#if authors.length === 0}
<br/>
{:else}
<p>By:</p>
<p class="inline">By:</p>
{/if}
{#each authors as author, i}
<a href={authorsLink[i]} class="text-blue-500">{author}</a>{i + 1 === authors.length
Expand Down

0 comments on commit 608603e

Please sign in to comment.