Skip to content

Commit

Permalink
Preview meta (#1821)
Browse files Browse the repository at this point in the history
* Preview OG meta

* Tweak text spacing

* shorten description

---------

Co-authored-by: David Crespo <[email protected]>
  • Loading branch information
benjaminleonard and david-crespo authored Nov 28, 2023
1 parent 17408f6 commit 4e1bbe1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Binary file added public/assets/og-preview-image.webp
Binary file not shown.
21 changes: 20 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@ const previewAnalyticsTag = {
},
}

const previewMetaTag = [
{
injectTo: 'head' as const,
tag: 'meta',
attrs: {
property: 'og:image',
content: '/assets/og-preview-image.webp',
},
},
{
injectTo: 'head' as const,
tag: 'meta',
attrs: {
property: 'og:description',
content: 'Preview of the Oxide web console with in-browser mock API',
},
},
]

// see https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
build: {
Expand All @@ -85,7 +104,7 @@ export default defineConfig(({ mode }) => ({
plugins: [
createHtmlPlugin({
inject: {
tags: process.env.VERCEL ? [previewAnalyticsTag] : [],
tags: process.env.VERCEL ? [previewAnalyticsTag, ...previewMetaTag] : [],
},
}),
react(),
Expand Down

0 comments on commit 4e1bbe1

Please sign in to comment.