📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Replace API opengraph image generator with Takumi
Blue Mousea8bb874939f0
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.tsindex aa37294ae..06f8a4947 100644--- a/web/app/lib/constants/index.ts+++ b/web/app/lib/constants/index.ts@@ -417,8 +417,8 @@ const FRONTEND_ORIGIN = isSelfhosted? (isBrowser ? window.REMIX_ENV?.BASE_URL : process.env.BASE_URL) || '': MAIN_URL-export const getOgImageUrl = (title: string) => {- return `${FRONTEND_ORIGIN}/og-image.png?title=${encodeURIComponent(title)}`+export const getOgImageUrl = (title: string, description?: string) => {+ return `${FRONTEND_ORIGIN}/og-image.png?title=${encodeURIComponent(title)}&description=${encodeURIComponent(description || '')}`}// Cookiesdiff --git a/web/app/routes/$.tsx b/web/app/routes/$.tsxindex dc20487db..dd384fb94 100644--- a/web/app/routes/$.tsx+++ b/web/app/routes/$.tsx@@ -23,7 +23,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {const title = data?.title || 'Blog'const intro = data?.intro || t('description.blog')- const ogImageUrl = getOgImageUrl(title)+ const ogImageUrl = getOgImageUrl(title, intro)return [...getTitle(title),diff --git a/web/app/routes/blog.$category.$slug.tsx b/web/app/routes/blog.$category.$slug.tsxindex 165666f8c..89af91c0c 100644--- a/web/app/routes/blog.$category.$slug.tsx+++ b/web/app/routes/blog.$category.$slug.tsx@@ -17,7 +17,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {const title = data?.title || 'Blog'const intro = data?.intro || t('description.blog')- const ogImageUrl = getOgImageUrl(title)+ const ogImageUrl = getOgImageUrl(title, intro)return [...getTitle(title),diff --git a/web/app/routes/blog.$slug.tsx b/web/app/routes/blog.$slug.tsxindex be278a48d..7f32041d7 100644--- a/web/app/routes/blog.$slug.tsx+++ b/web/app/routes/blog.$slug.tsx@@ -23,7 +23,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {const title = data?.title || 'Blog'const intro = data?.intro || t('description.blog')- const ogImageUrl = getOgImageUrl(title)+ const ogImageUrl = getOgImageUrl(title, intro)return [...getTitle(title),diff --git a/web/app/routes/blog._index.tsx b/web/app/routes/blog._index.tsxindex 01be07fc5..5cc39797c 100644--- a/web/app/routes/blog._index.tsx+++ b/web/app/routes/blog._index.tsx@@ -7,7 +7,11 @@ import type { LoaderFunctionArgs, MetaFunction } from 'react-router'import { redirect, Link, useLoaderData } from 'react-router'import { getBlogPosts } from '~/api/api.server'-import { isDisableMarketingPages, isSelfhosted } from '~/lib/constants'+import {+ getOgImageUrl,+ isDisableMarketingPages,+ isSelfhosted,+} from '~/lib/constants'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import { Text } from '~/ui/Text'@@ -32,7 +36,7 @@ export const meta: MetaFunction = () => {return [...getTitle('Blog'),...getDescription(t('description.blog')),- ...getPreviewImage(),+ ...getPreviewImage(getOgImageUrl('Blog', t('description.blog'))),]}diff --git a/web/app/routes/change-email.$id.tsx b/web/app/routes/change-email.$id.tsxindex 8e7658094..40eda8455 100644--- a/web/app/routes/change-email.$id.tsx+++ b/web/app/routes/change-email.$id.tsx@@ -8,7 +8,7 @@ import { redirect, useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -20,7 +20,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.verification')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.verification'), t('description.default')),+ ),]}diff --git a/web/app/routes/contact.tsx b/web/app/routes/contact.tsxindex 6310f2681..f4ca660ef 100644--- a/web/app/routes/contact.tsx+++ b/web/app/routes/contact.tsx@@ -3,7 +3,11 @@ import type { MetaFunction } from 'react-router'import { redirect } from 'react-router'import { SitemapFunction } from 'remix-sitemap'-import { isDisableMarketingPages, isSelfhosted } from '~/lib/constants'+import {+ getOgImageUrl,+ isDisableMarketingPages,+ isSelfhosted,+} from '~/lib/constants'import Contact from '~/pages/Contact'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -14,7 +18,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.contact')),...getDescription(t('description.contact')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.contact'), t('description.contact')),+ ),]}diff --git a/web/app/routes/dashboard.tsx b/web/app/routes/dashboard.tsxindex 2bf486e84..0af61c5bc 100644--- a/web/app/routes/dashboard.tsx+++ b/web/app/routes/dashboard.tsx@@ -8,7 +8,7 @@ import { data, redirect } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { getAuthenticatedUser, serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { Project } from '~/lib/models/Project'import Dashboard from '~/pages/Dashboard'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -24,7 +24,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.dashboard')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.dashboard'), t('description.default')),+ ),]}diff --git a/web/app/routes/login.tsx b/web/app/routes/login.tsxindex 506b6a79d..0d52876bc 100644--- a/web/app/routes/login.tsx+++ b/web/app/routes/login.tsx@@ -8,6 +8,7 @@ import type {import { redirect, data } from 'react-router'import { getAuthenticatedUser, loginUser, serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import Signin from '~/pages/Auth/Signin'import { decidePostAuthRedirect } from '~/utils/auth'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -23,7 +24,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.signin')),...getDescription(t('description.login')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.signin'), t('description.login')),+ ),]}diff --git a/web/app/routes/og-image[.png].tsx b/web/app/routes/og-image[.png].tsxindex d42807581..0ee78ed43 100644--- a/web/app/routes/og-image[.png].tsx+++ b/web/app/routes/og-image[.png].tsx@@ -5,7 +5,7 @@ import { ImageResponse } from '@takumi-rs/image-response'import type { LoaderFunctionArgs } from 'react-router'const MAX_TITLE_LENGTH = 50-const MAX_DESCRIPTION_LENGTH = 120+const MAX_DESCRIPTION_LENGTH = 200const logoData = readFileSync(join(process.cwd(), 'public', 'assets', 'logo', 'blue.png'),@@ -25,7 +25,7 @@ interface OgImageProps {}function OgImage({ title, description, label }: OgImageProps) {- const titleFontSize = title.length > 30 ? 84 : 96+ const titleFontSize = title.length > 30 ? 90 : 104return (<div tw='flex w-full h-full' style={{ backgroundColor: '#f1f5f9' }}>@@ -115,7 +115,7 @@ function OgImage({ title, description, label }: OgImageProps) {<divstyle={{fontSize: titleFontSize,- fontWeight: 800,+ fontWeight: 600,lineHeight: 1.1,letterSpacing: '-0.025em',color: '#0f172a',@@ -130,8 +130,8 @@ function OgImage({ title, description, label }: OgImageProps) {fontSize: 39,fontWeight: 400,lineHeight: 1.45,- color: '#334155',- marginTop: '18px',+ color: '#1e293b',+ marginTop: '3rem',}}>{description}diff --git a/web/app/routes/onboarding.tsx b/web/app/routes/onboarding.tsxindex f5660d7ec..d44158449 100644--- a/web/app/routes/onboarding.tsx+++ b/web/app/routes/onboarding.tsx@@ -8,6 +8,7 @@ import { data, redirect } from 'react-router'import { SitemapFunction } from 'remix-sitemap'import { getAuthenticatedUser, serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import { DEFAULT_METAINFO, Metainfo } from '~/lib/models/Metainfo'import { Project } from '~/lib/models/Project'import { User } from '~/lib/models/User'@@ -29,7 +30,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('onboarding.welcome')),...getDescription(t('description.onboarding')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('onboarding.welcome'), t('description.onboarding')),+ ),]}diff --git a/web/app/routes/open.tsx b/web/app/routes/open.tsxindex 6596a2d27..69d205e77 100644--- a/web/app/routes/open.tsx+++ b/web/app/routes/open.tsx@@ -9,7 +9,11 @@ import {import type { SitemapFunction } from 'remix-sitemap'import { getGeneralStats } from '~/api/api.server'-import { isDisableMarketingPages, isSelfhosted } from '~/lib/constants'+import {+ getOgImageUrl,+ isDisableMarketingPages,+ isSelfhosted,+} from '~/lib/constants'import OpenStartup from '~/pages/OpenStartup'import Style from '~/styles/ProjectViewStyle.css?url'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -21,7 +25,7 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.open')),...getDescription(t('description.open')),- ...getPreviewImage(),+ ...getPreviewImage(getOgImageUrl(t('titles.open'), t('description.open'))),]}diff --git a/web/app/routes/organisation.invite.$id.tsx b/web/app/routes/organisation.invite.$id.tsxindex f0d1ddfa5..94ea42a61 100644--- a/web/app/routes/organisation.invite.$id.tsx+++ b/web/app/routes/organisation.invite.$id.tsx@@ -4,6 +4,7 @@ import { useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -15,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.invitation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.invitation'), t('description.default')),+ ),]}diff --git a/web/app/routes/organisations.$id.tsx b/web/app/routes/organisations.$id.tsxindex 07d496676..3d011b838 100644--- a/web/app/routes/organisations.$id.tsx+++ b/web/app/routes/organisations.$id.tsx@@ -8,7 +8,7 @@ import { data, redirect } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { DetailedOrganisation } from '~/lib/models/Organisation'import OrganisationSettings from '~/pages/Organisations/Settings'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -26,7 +26,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {return [...getTitle(title),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(getOgImageUrl(title, t('description.default'))),]}diff --git a/web/app/routes/organisations._index.tsx b/web/app/routes/organisations._index.tsxindex 27c6331bb..a9e50f737 100644--- a/web/app/routes/organisations._index.tsx+++ b/web/app/routes/organisations._index.tsx@@ -8,7 +8,11 @@ import { redirect, data } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { ENTRIES_PER_PAGE_DASHBOARD, isSelfhosted } from '~/lib/constants'+import {+ ENTRIES_PER_PAGE_DASHBOARD,+ getOgImageUrl,+ isSelfhosted,+} from '~/lib/constants'import { DetailedOrganisation } from '~/lib/models/Organisation'import Organisations from '~/pages/Organisations'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -24,7 +28,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.organisations')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.organisations'), t('description.default')),+ ),]}diff --git a/web/app/routes/password-reset.$id.tsx b/web/app/routes/password-reset.$id.tsxindex c35f7d15b..cc413c6e2 100644--- a/web/app/routes/password-reset.$id.tsx+++ b/web/app/routes/password-reset.$id.tsx@@ -8,6 +8,7 @@ import { data, redirect } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import CreateNewPassword from '~/pages/Auth/CreateNewPassword'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import {@@ -23,7 +24,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.recovery')),...getDescription(t('description.recovery')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.recovery'), t('description.recovery')),+ ),]}diff --git a/web/app/routes/project.transfer.cancel.tsx b/web/app/routes/project.transfer.cancel.tsxindex 9e767b360..6437ee99a 100644--- a/web/app/routes/project.transfer.cancel.tsx+++ b/web/app/routes/project.transfer.cancel.tsx@@ -4,6 +4,7 @@ import { useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -15,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.invitation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.invitation'), t('description.default')),+ ),]}diff --git a/web/app/routes/project.transfer.confirm.tsx b/web/app/routes/project.transfer.confirm.tsxindex 28d0ea28f..e9e85b49a 100644--- a/web/app/routes/project.transfer.confirm.tsx+++ b/web/app/routes/project.transfer.confirm.tsx@@ -4,6 +4,7 @@ import { useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -15,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.invitation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.invitation'), t('description.default')),+ ),]}diff --git a/web/app/routes/projects.$id.subscribers.invite.tsx b/web/app/routes/projects.$id.subscribers.invite.tsxindex 8c6e324bc..b0864bc6a 100644--- a/web/app/routes/projects.$id.subscribers.invite.tsx+++ b/web/app/routes/projects.$id.subscribers.invite.tsx@@ -4,6 +4,7 @@ import { useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -15,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.invitation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.invitation'), t('description.default')),+ ),]}diff --git a/web/app/routes/projects.settings.$id.tsx b/web/app/routes/projects.settings.$id.tsxindex 3c1c166dc..1079b9b61 100644--- a/web/app/routes/projects.settings.$id.tsx+++ b/web/app/routes/projects.settings.$id.tsx@@ -7,6 +7,7 @@ import type {import { data, redirect } from 'react-router'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import { Project } from '~/lib/models/Project'import { Subscriber } from '~/lib/models/Subscriber'import ProjectSettings from '~/pages/Project/Settings'@@ -25,7 +26,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {return [...getTitle(title),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(getOgImageUrl(title, t('description.default'))),]}diff --git a/web/app/routes/recovery.tsx b/web/app/routes/recovery.tsxindex 8518c465b..992f873cb 100644--- a/web/app/routes/recovery.tsx+++ b/web/app/routes/recovery.tsx@@ -9,6 +9,7 @@ import { data, redirect } from 'react-router'import { SitemapFunction } from 'remix-sitemap'import { getAuthenticatedUser, serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import ForgotPassword from '~/pages/Auth/ForgotPassword'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import { isValidEmail } from '~/utils/validator'@@ -20,7 +21,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.recovery')),...getDescription(t('description.recovery')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.recovery'), t('description.recovery')),+ ),]}diff --git a/web/app/routes/reports-unsubscribe.$token.tsx b/web/app/routes/reports-unsubscribe.$token.tsxindex 41e4217c9..42d1db7c6 100644--- a/web/app/routes/reports-unsubscribe.$token.tsx+++ b/web/app/routes/reports-unsubscribe.$token.tsx@@ -4,7 +4,7 @@ import { redirect, useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -16,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle('Unsubscribe from email reports'),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.unsubscribe'), t('description.default')),+ ),]}diff --git a/web/app/routes/share.$id.tsx b/web/app/routes/share.$id.tsxindex 271abfea2..5bba51a04 100644--- a/web/app/routes/share.$id.tsx+++ b/web/app/routes/share.$id.tsx@@ -4,6 +4,7 @@ import { useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'+import { getOgImageUrl } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -15,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.invitation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.invitation'), t('description.default')),+ ),]}diff --git a/web/app/routes/signup.tsx b/web/app/routes/signup.tsxindex b6618ac3e..ee4ed43a5 100644--- a/web/app/routes/signup.tsx+++ b/web/app/routes/signup.tsx@@ -9,7 +9,7 @@ import { redirect, data } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { getAuthenticatedUser, registerUser } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Signup from '~/pages/Auth/Signup'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import { createHeadersWithCookies } from '~/utils/session.server'@@ -21,7 +21,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.signup')),...getDescription(t('description.signup')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.signup'), t('description.signup')),+ ),]}diff --git a/web/app/routes/socialised.tsx b/web/app/routes/socialised.tsxindex 5484e7f5a..8585157d6 100644--- a/web/app/routes/socialised.tsx+++ b/web/app/routes/socialised.tsx@@ -1,6 +1,7 @@import { useTranslation } from 'react-i18next'import type { MetaFunction } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'+import { getOgImageUrl } from '~/lib/constants'import Socialised from '~/pages/Auth/Socialised'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -12,7 +13,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.socialisation')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.socialisation'), t('description.default')),+ ),]}diff --git a/web/app/routes/subscribe.tsx b/web/app/routes/subscribe.tsxindex 179119288..875eeb104 100644--- a/web/app/routes/subscribe.tsx+++ b/web/app/routes/subscribe.tsx@@ -4,7 +4,7 @@ import { data, redirect } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { getAuthenticatedUser, serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { DEFAULT_METAINFO, Metainfo } from '~/lib/models/Metainfo'import Subscribe from '~/pages/Subscribe'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -24,7 +24,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.subscribe')),...getDescription(t('description.checkout')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.subscribe'), t('description.checkout')),+ ),]}diff --git a/web/app/routes/tools._index.tsx b/web/app/routes/tools._index.tsxindex 7ff7ef966..5150a8dc4 100644--- a/web/app/routes/tools._index.tsx+++ b/web/app/routes/tools._index.tsx@@ -5,12 +5,15 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { TOOLS } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { Text } from '~/ui/Text'import { getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {- return [...getTitle('Free Marketing Tools'), ...getPreviewImage()]+ return [+ ...getTitle('Free Marketing Tools'),+ ...getPreviewImage(getOgImageUrl('Free Marketing Tools')),+ ]}export const sitemap: SitemapFunction = () => ({diff --git a/web/app/routes/tools.ab-test-calculator.tsx b/web/app/routes/tools.ab-test-calculator.tsxindex b5d5fc25b..d01f7ba8b 100644--- a/web/app/routes/tools.ab-test-calculator.tsx+++ b/web/app/routes/tools.ab-test-calculator.tsx@@ -10,7 +10,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Input from '~/ui/Input'import Select from '~/ui/Select'import { Text } from '~/ui/Text'@@ -19,12 +19,14 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free A/B Test Significance Calculator - Swetrix'+ const description =+ 'Calculate statistical significance for your A/B tests to determine if your variation performs better than the control. Fast, free, and accurate.'+return [- ...getTitle('Free A/B Test Significance Calculator - Swetrix'),- ...getDescription(- 'Calculate statistical significance for your A/B tests to determine if your variation performs better than the control. Fast, free, and accurate.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.ad-cost-calculator.tsx b/web/app/routes/tools.ad-cost-calculator.tsxindex 6c8646d26..1ba503696 100644--- a/web/app/routes/tools.ad-cost-calculator.tsx+++ b/web/app/routes/tools.ad-cost-calculator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Input from '~/ui/Input'import { Text } from '~/ui/Text'import { FAQ } from '~/ui/FAQ'@@ -14,12 +14,14 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free Ad Cost Calculator (CPM, CPC, CPA) - Swetrix'+ const description =+ 'Calculate CPM (Cost Per Mille), CPC (Cost Per Click), and CPA (Cost Per Action) instantly. Analyze your ad campaign costs and performance.'+return [- ...getTitle('Free Ad Cost Calculator (CPM, CPC, CPA) - Swetrix'),- ...getDescription(- 'Calculate CPM (Cost Per Mille), CPC (Cost Per Click), and CPA (Cost Per Action) instantly. Analyze your ad campaign costs and performance.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.ctr-calculator.tsx b/web/app/routes/tools.ctr-calculator.tsxindex 33a1340e7..1c93ca53f 100644--- a/web/app/routes/tools.ctr-calculator.tsx+++ b/web/app/routes/tools.ctr-calculator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import { FAQ } from '~/ui/FAQ'@@ -14,12 +14,13 @@ import { Text } from '~/ui/Text'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free CTR Calculator tool - Calculate your CTR'+ const description =+ "Use Swetrix's free CTR Calculator to instantly compute click‑through rate from clicks and impressions, learn what a good CTR looks like, and get tips to improve campaign performance—privacy-first and easy to use."return [- ...getTitle('Free CTR Calculator tool - Calculate your CTR'),- ...getDescription(- "Use Swetrix's free CTR Calculator to instantly compute click‑through rate from clicks and impressions, learn what a good CTR looks like, and get tips to improve campaign performance—privacy-first and easy to use.",- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.ip-lookup.tsx b/web/app/routes/tools.ip-lookup.tsxindex 082ef3159..3f78db849 100644--- a/web/app/routes/tools.ip-lookup.tsx+++ b/web/app/routes/tools.ip-lookup.tsx@@ -8,7 +8,7 @@ import { ClientOnly } from 'remix-utils/client-only'import { getIpLookupServer, getClientIP } from '~/api/api.server'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Flag from '~/ui/Flag'import Input from '~/ui/Input'@@ -18,12 +18,13 @@ import Spin from '~/ui/icons/Spin'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free IP Address Lookup tool - What is my IP address?'+ const description =+ 'Find your public IP address instantly and look up any IPv4 or IPv6 for detailed geolocation data—country, region, city, coordinates, timezone, and EU status—plus an interactive map. Free, no registration or limits.'return [- ...getTitle('Free IP Address Lookup tool - What is my IP address?'),- ...getDescription(- 'Find your public IP address instantly and look up any IPv4 or IPv6 for detailed geolocation data—country, region, city, coordinates, timezone, and EU status—plus an interactive map. Free, no registration or limits.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.ltv-calculator.tsx b/web/app/routes/tools.ltv-calculator.tsxindex 144a76357..7ebac8256 100644--- a/web/app/routes/tools.ltv-calculator.tsx+++ b/web/app/routes/tools.ltv-calculator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Input from '~/ui/Input'import { FAQ } from '~/ui/FAQ'import { Text } from '~/ui/Text'@@ -14,12 +14,13 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free LTV Calculator - Customer Lifetime Value'+ const description =+ 'Calculate Customer Lifetime Value (LTV) and LTV:CAC ratio. Optimize your marketing spend and understand the long-term value of your customers.'return [- ...getTitle('Free LTV Calculator - Customer Lifetime Value'),- ...getDescription(- 'Calculate Customer Lifetime Value (LTV) and LTV:CAC ratio. Optimize your marketing spend and understand the long-term value of your customers.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.meta-tags-generator.tsx b/web/app/routes/tools.meta-tags-generator.tsxindex 944a74dd1..cee99c316 100644--- a/web/app/routes/tools.meta-tags-generator.tsx+++ b/web/app/routes/tools.meta-tags-generator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Input from '~/ui/Input'import Textarea from '~/ui/Textarea'import CodeBlock from '~/ui/CodeBlock'@@ -16,12 +16,13 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free Meta Tags & Open Graph Generator - Swetrix'+ const description =+ 'Generate perfect HTML meta tags, Open Graph for Facebook/LinkedIn, and Twitter Cards to make your links look great when shared on social media.'return [- ...getTitle('Free Meta Tags & Open Graph Generator - Swetrix'),- ...getDescription(- 'Generate perfect HTML meta tags, Open Graph for Facebook/LinkedIn, and Twitter Cards to make your links look great when shared on social media.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.qr-code-generator.tsx b/web/app/routes/tools.qr-code-generator.tsxindex 7d643ae5f..645141ecc 100644--- a/web/app/routes/tools.qr-code-generator.tsx+++ b/web/app/routes/tools.qr-code-generator.tsx@@ -8,7 +8,7 @@ import { ClientOnly } from 'remix-utils/client-only'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import Textarea from '~/ui/Textarea'@@ -18,12 +18,13 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free QR Code Generator - Swetrix'+ const description =+ 'Create high-quality, customizable QR codes instantly. Perfect for links, marketing materials, and offline-to-online campaigns.'return [- ...getTitle('Free QR Code Generator - Swetrix'),- ...getDescription(- 'Create high-quality, customizable QR codes instantly. Perfect for links, marketing materials, and offline-to-online campaigns.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.robots-txt-generator.tsx b/web/app/routes/tools.robots-txt-generator.tsxindex a70754ec1..64e45abc0 100644--- a/web/app/routes/tools.robots-txt-generator.tsx+++ b/web/app/routes/tools.robots-txt-generator.tsx@@ -11,7 +11,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import Select from '~/ui/Select'@@ -21,12 +21,13 @@ import { FAQ } from '~/ui/FAQ'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free Robots.txt Generator - Swetrix'+ const description =+ 'Create and validate robots.txt files for your website instantly. Control how search engines like Googlebot and Bingbot crawl your site.'return [- ...getTitle('Free Robots.txt Generator - Swetrix'),- ...getDescription(- 'Create and validate robots.txt files for your website instantly. Control how search engines like Googlebot and Bingbot crawl your site.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.roi-calculator.tsx b/web/app/routes/tools.roi-calculator.tsxindex 527e21885..ba7c612f5 100644--- a/web/app/routes/tools.roi-calculator.tsx+++ b/web/app/routes/tools.roi-calculator.tsx@@ -10,7 +10,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Input from '~/ui/Input'import { Text } from '~/ui/Text'import { FAQ } from '~/ui/FAQ'@@ -18,12 +18,13 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free ROI Calculator tool - Calculate your ROI'+ const description =+ 'Free Marketing ROI Calculator: quickly calculate ROAS, ROI, profit, CAC, CPC, CPM, CTR, conversion rate, and break-even ROAS to measure and improve your campaign performance.'return [- ...getTitle('Free ROI Calculator tool - Calculate your ROI'),- ...getDescription(- 'Free Marketing ROI Calculator: quickly calculate ROAS, ROI, profit, CAC, CPC, CPM, CTR, conversion rate, and break-even ROAS to measure and improve your campaign performance.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.schema-markup-generator.tsx b/web/app/routes/tools.schema-markup-generator.tsxindex 317e97c20..b989d02c9 100644--- a/web/app/routes/tools.schema-markup-generator.tsx+++ b/web/app/routes/tools.schema-markup-generator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import Select from '~/ui/Select'@@ -17,12 +17,13 @@ import { FAQ } from '~/ui/FAQ'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free Schema Markup (JSON-LD) Generator - Swetrix'+ const description =+ 'Generate valid JSON-LD schema markup for your website to get rich snippets in Google search results. Supports Article, FAQ, Local Business, and more.'return [- ...getTitle('Free Schema Markup (JSON-LD) Generator - Swetrix'),- ...getDescription(- 'Generate valid JSON-LD schema markup for your website to get rich snippets in Google search results. Supports Article, FAQ, Local Business, and more.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.sitemap-validator.tsx b/web/app/routes/tools.sitemap-validator.tsxindex 6059d9fa6..173673e9c 100644--- a/web/app/routes/tools.sitemap-validator.tsx+++ b/web/app/routes/tools.sitemap-validator.tsx@@ -13,7 +13,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import { Text } from '~/ui/Text'@@ -21,12 +21,13 @@ import { FAQ } from '~/ui/FAQ'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free Sitemap Validator tool - Validate your sitemap.xml'+ const description =+ 'Validate your sitemap.xml for errors, warnings, and SEO best practices. Our free XML Sitemap Validator checks sitemap protocol compliance, URL formatting, required tags, lastmod/date formats, and size limits—so search engines can crawl and index your site correctly.'return [- ...getTitle('Free Sitemap Validator tool - Validate your sitemap.xml'),- ...getDescription(- 'Validate your sitemap.xml for errors, warnings, and SEO best practices. Our free XML Sitemap Validator checks sitemap protocol compliance, URL formatting, required tags, lastmod/date formats, and size limits—so search engines can crawl and index your site correctly.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/tools.utm-generator.tsx b/web/app/routes/tools.utm-generator.tsxindex f2533476d..7c9989891 100644--- a/web/app/routes/tools.utm-generator.tsx+++ b/web/app/routes/tools.utm-generator.tsx@@ -6,7 +6,7 @@ import type { SitemapFunction } from 'remix-sitemap'import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { ToolsNav, ToolsNavMobile } from '~/components/ToolsNav'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Button from '~/ui/Button'import Input from '~/ui/Input'import { Text } from '~/ui/Text'@@ -15,12 +15,13 @@ import Tooltip from '~/ui/Tooltip'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {+ const title = 'Free UTM Generator tool - Create UTM parameters'+ const description =+ 'Generate trackable UTM links in seconds. Add utm_source, utm_medium, utm_campaign and optional utm_content/utm_term, then copy the final URL to measure marketing campaign performance with clean, consistent parameters.'return [- ...getTitle('Free UTM Generator tool - Create UTM parameters'),- ...getDescription(- 'Generate trackable UTM links in seconds. Add utm_source, utm_medium, utm_campaign and optional utm_content/utm_term, then copy the final URL to measure marketing campaign performance with clean, consistent parameters.',- ),- ...getPreviewImage(),+ ...getTitle(title),+ ...getDescription(description),+ ...getPreviewImage(getOgImageUrl(title, description)),]}diff --git a/web/app/routes/user-settings.tsx b/web/app/routes/user-settings.tsxindex 8c761f39e..c30640cc3 100644--- a/web/app/routes/user-settings.tsx+++ b/web/app/routes/user-settings.tsx@@ -8,7 +8,7 @@ import { data } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { Metainfo } from '~/lib/models/Metainfo'import { UsageInfo } from '~/lib/models/Usageinfo'import { User } from '~/lib/models/User'@@ -33,7 +33,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.profileSettings')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.profileSettings'), t('description.default')),+ ),]}diff --git a/web/app/routes/verify.$id.tsx b/web/app/routes/verify.$id.tsxindex 708ea0d39..7e3019387 100644--- a/web/app/routes/verify.$id.tsx+++ b/web/app/routes/verify.$id.tsx@@ -4,7 +4,7 @@ import { redirect, useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { serverFetch } from '~/api/api.server'-import { isSelfhosted } from '~/lib/constants'+import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'@@ -16,7 +16,9 @@ export const meta: MetaFunction = () => {return [...getTitle(t('titles.verification')),...getDescription(t('description.default')),- ...getPreviewImage(),+ ...getPreviewImage(+ getOgImageUrl(t('titles.verification'), t('description.default')),+ ),]}