Skip to content

Commit ab53b91

Browse files
committed
main 🧊 add new title
1 parent 9659d62 commit ab53b91

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

packages/newdocs/app/(app)/(root)/page.tsx

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,31 @@ import {
2020
LandingStats
2121
} from '../_components/sections';
2222

23-
export const metadata: Metadata = {
24-
title: CONFIG.NAME,
25-
description: CONFIG.DESCRIPTION,
26-
openGraph: {
27-
title: CONFIG.NAME,
28-
description: CONFIG.DESCRIPTION,
29-
type: 'website',
30-
url: '/',
31-
images: [
32-
{
33-
url: '/og.png'
34-
}
35-
]
36-
},
37-
twitter: {
38-
card: 'summary_large_image',
39-
title: CONFIG.NAME,
23+
export const generateMetadata = async (): Promise<Metadata> => {
24+
const hooks = await getElements('hook');
25+
26+
return {
27+
title: `reactuse ${hooks.length}+ The largest React hooks library.`,
4028
description: CONFIG.DESCRIPTION,
41-
images: ['/og.png'],
42-
creator: '@siberiacancode'
43-
}
29+
openGraph: {
30+
title: `reactuse ${hooks.length}+ The largest React hooks library.`,
31+
description: CONFIG.DESCRIPTION,
32+
type: 'website',
33+
url: '/',
34+
images: [
35+
{
36+
url: '/og.png'
37+
}
38+
]
39+
},
40+
twitter: {
41+
card: 'summary_large_image',
42+
title: `reactuse ${hooks.length}+ The largest React hooks library.`,
43+
description: CONFIG.DESCRIPTION,
44+
images: ['/og.png'],
45+
creator: '@siberiacancode'
46+
}
47+
};
4448
};
4549

4650
const HomePage = async () => {

packages/newdocs/src/constants/config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
export const CONFIG = {
2-
NAME: 'reactuse',
3-
ALGOLIA: {
4-
APP_ID: '62LROXAB1F',
5-
API_KEY: '87ab8dd07b4aba02814c082d98e4b8a7',
6-
INDEX_NAME: 'reactuse'
7-
},
1+
export const CONFIG = {
2+
NAME: 'reactuse',
3+
ALGOLIA: {
4+
APP_ID: '62LROXAB1F',
5+
API_KEY: '87ab8dd07b4aba02814c082d98e4b8a7',
6+
INDEX_NAME: 'reactuse'
7+
},
88
URL: 'https://reactuse.org',
99
DESCRIPTION: 'Improve your react applications with our library 📦 designed for comfort and speed',
1010
SOURCE: (name: string, type = 'ts') =>

0 commit comments

Comments
 (0)