diff --git a/website/.vitepress/config.mts b/website/.vitepress/config.mts index f485ce04f7..85172431b0 100644 --- a/website/.vitepress/config.mts +++ b/website/.vitepress/config.mts @@ -207,6 +207,22 @@ export default defineConfig({ { icon: 'github', link: 'https://github.com/electric-sql' } ] }, + transformHead: ({ pageData, siteData }) => { + const fm = pageData.frontmatter + const head = [] + + const title = `${fm.title || siteData.title} | ${fm.titleTemplate || 'ElectricSQL'}` + const description = fm.description || siteData.description + const image = `https://electric-sql.com${fm.image || '/img/postgres-sync.jpg'}` + + head.push(['meta', { name: 'twitter:card', content: 'summary_large_image' }]) + head.push(['meta', { name: 'twitter:image', content: image }]) + head.push(['meta', { property: 'og:title', content: title }]) + head.push(['meta', { property: 'og:description', content: description }]) + head.push(['meta', { property: 'og:image', content: image }]) + + return head + }, transformPageData(pageData) { pageData.frontmatter.editLink = pageData.relativePath.startsWith('docs') } diff --git a/website/index.md b/website/index.md index c7a427d60d..0cd2f48978 100644 --- a/website/index.md +++ b/website/index.md @@ -2,7 +2,7 @@ layout: home title: 'ElectricSQL' titleTemplate: 'Postgres Sync' -description: 'Your data, in sync, wherever you need it.' +description: 'Sync little subsets of your Postgres data into local apps and services.' hero: name: "Why fetch when" text: "you can sync?" diff --git a/website/public/img/postgres-sync.jpg b/website/public/img/postgres-sync.jpg new file mode 100644 index 0000000000..3639df8768 Binary files /dev/null and b/website/public/img/postgres-sync.jpg differ