add meta for docs
This commit is contained in:
BIN
apps/docs/public/favicon.ico
Normal file
BIN
apps/docs/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
apps/docs/public/ogimage.png
Normal file
BIN
apps/docs/public/ogimage.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 183 KiB |
@@ -1,10 +1,14 @@
|
|||||||
import type { AppProps } from 'next/app';
|
import type { AppProps } from 'next/app';
|
||||||
|
import Head from 'next/head';
|
||||||
|
|
||||||
import 'src/globals.css';
|
import 'src/globals.css';
|
||||||
|
|
||||||
export default function App({ Component, pageProps }: AppProps) {
|
export default function App({ Component, pageProps }: AppProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<Head>
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
</Head>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ export default {
|
|||||||
<strong style={{ marginLeft: '8px' }}>openpanel</strong>
|
<strong style={{ marginLeft: '8px' }}>openpanel</strong>
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
head: (props) => {
|
head: () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const config = useConfig();
|
const config = useConfig();
|
||||||
const title = config.title;
|
const title = config.title;
|
||||||
const description =
|
const description = 'An open-source alternative to Mixpanel';
|
||||||
config.description || 'An open-source alternative to Mixpanel';
|
|
||||||
const domain = 'https://docs.openpanel.dev';
|
const domain = 'https://docs.openpanel.dev';
|
||||||
const canonicalUrl =
|
const canonicalUrl =
|
||||||
`${domain}${router.asPath === '/' ? '' : router.asPath}`.split('?')[0];
|
`${domain}${router.asPath === '/' ? '' : router.asPath}`.split('?')[0];
|
||||||
@@ -39,7 +38,10 @@ export default {
|
|||||||
<meta name="og:url" content={canonicalUrl} />
|
<meta name="og:url" content={canonicalUrl} />
|
||||||
<meta name="og:title" content={`${title} - Openpanel Docs`} />
|
<meta name="og:title" content={`${title} - Openpanel Docs`} />
|
||||||
<meta property="og:description" content={description} />
|
<meta property="og:description" content={description} />
|
||||||
<meta name="og:image" content={'https://openpanel.dev/ogimage.png'} />
|
<meta
|
||||||
|
name="og:image"
|
||||||
|
content={'https://docs.openpanel.dev/ogimage.png'}
|
||||||
|
/>
|
||||||
<meta name="title" content={title} />
|
<meta name="title" content={title} />
|
||||||
<meta name="description" content={description} />
|
<meta name="description" content={description} />
|
||||||
</>
|
</>
|
||||||
@@ -53,11 +55,6 @@ export default {
|
|||||||
},
|
},
|
||||||
docsRepositoryBase:
|
docsRepositoryBase:
|
||||||
'https://github.com/openpanel-dev/openpanel/blob/main/apps/docs',
|
'https://github.com/openpanel-dev/openpanel/blob/main/apps/docs',
|
||||||
useNextSeoProps() {
|
|
||||||
return {
|
|
||||||
titleTemplate: '%s - Openpanel',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
footer: {
|
footer: {
|
||||||
text: (
|
text: (
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
Reference in New Issue
Block a user