Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: add og and twitter preview support (#1350)

Himself6578fdaf140dc2
diff --git a/apps/web/src/pages/_app.tsx b/apps/web/src/pages/_app.tsx
index 35803b1d98..4be54dbd9e 100644
--- a/apps/web/src/pages/_app.tsx
+++ b/apps/web/src/pages/_app.tsx
@@ -8,6 +8,7 @@ import { CacheProvider } from '@emotion/react';
import { Provider } from 'jotai';
import { useAtomsDebugValue } from 'jotai-devtools';
import { AppProps } from 'next/app';
+import Head from 'next/head';
import { useRouter } from 'next/router';
import React, { memo, ReactElement, Suspense, useEffect, useMemo } from 'react';
import { Helmet, HelmetProvider } from 'react-helmet-async';
@@ -92,6 +93,40 @@ const App = function App({
content="initial-scale=1, width=device-width"
/>
</Helmet>
+ <Head>
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta
+ name="twitter:url"
+ content="https://app.affine.pro/"
+ />
+ <meta
+ name="twitter:title"
+ content="AFFiNE:There can be more than Notion and Miro."
+ />
+ <meta
+ name="twitter:description"
+ content="There can be more than Notion and Miro. AFFiNE is a next-gen knowledge base that brings planning, sorting and creating all together."
+ />
+ <meta name="twitter:site" content="@AffineOfficial" />
+ <meta
+ name="twitter:image"
+ content="https://affine.pro/og.jpeg"
+ />
+ <meta
+ property="og:title"
+ content="AFFiNE:There can be more than Notion and Miro."
+ />
+ <meta property="og:type" content="website" />
+ <meta
+ property="og:description"
+ content="There can be more than Notion and Miro. AFFiNE is a next-gen knowledge base that brings planning, sorting and creating all together."
+ />
+ <meta property="og:url" content="https://app.affine.pro/" />
+ <meta
+ property="og:image"
+ content="https://affine.pro/og.jpeg"
+ />
+ </Head>
{getLayout(<Component {...pageProps} />)}
</HelmetProvider>
</ProviderComposer>