Skip to content

Commit 113b95d

Browse files
committed
chore: improve metatadata
1 parent d682937 commit 113b95d

8 files changed

Lines changed: 90 additions & 4 deletions

File tree

apps/docs/src/app/demo/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
import type { Metadata } from 'next'
2+
13
import { Demo } from '@/components/demo/demo'
24
import { PageHeading } from '@/components/page-heading'
35

6+
export const metadata: Metadata = {
7+
title: 'Demo',
8+
description:
9+
'Try the interactive React QR Code demo to experiment with customization options and see how the library works in real time.',
10+
}
11+
412
export default function Page() {
513
return (
614
<>

apps/docs/src/app/examples/basic/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
import type { Metadata } from 'next'
2+
13
import { Demo, codeBlock } from '@/components/demos/demo-basic'
24
import { PageHeading } from '@/components/page-heading'
35
import { ExampleTabs } from '@/components/ui/example-tabs'
46
import { TypographyP } from '@/components/ui/typography'
57

8+
export const metadata: Metadata = {
9+
title: 'Basic Example',
10+
description:
11+
'See a basic example of using the @lglab/react-qr-code library to render a customizable QR code in a React application.',
12+
}
13+
614
export default function Page() {
715
return (
816
<>
9-
<PageHeading heading='Basic' />
17+
<PageHeading heading='Basic example' />
1018
<TypographyP>
1119
The @lglab/react-qr-code library makes it easy to generate customizable QR codes
1220
in your React applications. Here&apos;s a simple example to get you started.

apps/docs/src/app/installation/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import type { Metadata } from 'next'
2+
13
import { CodeBlock } from '@/components/code-block'
24
import { PageHeading } from '@/components/page-heading'
35
import { TypographyBold, TypographyP } from '@/components/ui/typography'
46

7+
export const metadata: Metadata = {
8+
title: 'Installation',
9+
description:
10+
'Install the @lglab/react-qr-code library using your preferred JavaScript package manager, including pnpm, npm, yarn, or bun.',
11+
}
12+
513
export default function Page() {
614
return (
715
<>

apps/docs/src/app/layout.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,37 @@ const mono = Source_Code_Pro({
2020
})
2121

2222
export const metadata: Metadata = {
23-
title: 'React QR Code - Customizable QR Code Generator for React',
23+
metadataBase: new URL('https://reactqrcode.com'),
24+
title: {
25+
default: 'React QR Code – Customizable QR Code Generator for React',
26+
template: '%s – React QR Code',
27+
},
2428
description:
25-
'React QR Code is a highly customizable and lightweight QR code generator for React applications. Easily style QR codes with unique finder patterns, rounded corners, and customizable colors. Explore the documentation and live demo to get started quickly!',
29+
'React QR Code is a highly customizable and lightweight QR code generator for React applications. Easily style QR codes with unique finder patterns, rounded corners, and customizable colors.',
30+
keywords: [
31+
'React QR Code',
32+
'QR code generator',
33+
'React QR library',
34+
'SVG QR code',
35+
'customizable QR codes',
36+
],
37+
alternates: {
38+
canonical: '/',
39+
},
40+
openGraph: {
41+
type: 'website',
42+
url: 'https://reactqrcode.com',
43+
title: 'React QR Code – Customizable QR Code Generator for React',
44+
description:
45+
'Generate highly customizable, high-performance QR codes in React using SVG, gradients, and finder pattern controls.',
46+
siteName: 'React QR Code',
47+
},
48+
twitter: {
49+
card: 'summary_large_image',
50+
title: 'React QR Code – Customizable QR Code Generator for React',
51+
description:
52+
'Lightweight, customizable QR code generator for React with SVG rendering and fine-grained styling.',
53+
},
2654
verification: {
2755
google: process.env.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION,
2856
},

apps/docs/src/app/llms-txt/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { Metadata } from 'next'
2+
13
import { PageHeading } from '@/components/page-heading'
24
import {
35
TypographyBold,
@@ -7,6 +9,12 @@ import {
79
TypographyP,
810
} from '@/components/ui/typography'
911

12+
export const metadata: Metadata = {
13+
title: 'llms.txt',
14+
description:
15+
'Learn how the llms.txt and llms-full.txt files describe the @lglab/react-qr-code library for AI coding assistants such as Cursor.',
16+
}
17+
1018
export default function Page() {
1119
return (
1220
<>
@@ -26,7 +34,7 @@ export default function Page() {
2634
tools to provide accurate code suggestions and documentation.
2735
</TypographyP>
2836

29-
<TypographyH2>Available Routes</TypographyH2>
37+
<TypographyH2>Available routes</TypographyH2>
3038
<TypographyP>
3139
We provide two distinct files to cater to different levels of detail:
3240
</TypographyP>

apps/docs/src/app/quick-start/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import type { Metadata } from 'next'
2+
13
import { CodeEditor } from '@/components/code-editor'
24
import { PageHeading } from '@/components/page-heading'
35
import { TypographyP } from '@/components/ui/typography'
46

7+
export const metadata: Metadata = {
8+
title: 'Quick Start',
9+
description:
10+
'Follow this quick start guide to render your first QR code in React using the @lglab/react-qr-code component.',
11+
}
12+
513
const codeBlock = `
614
import { ReactQRCode } from '@lglab/react-qr-code'
715

apps/docs/src/app/react-qr-code-props/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { Metadata } from 'next'
12
import Link from 'next/link'
23

34
import type { Prop } from '@/types/props'
@@ -6,6 +7,12 @@ import { PageHeading } from '@/components/page-heading'
67
import { PropsTable } from '@/components/props-table'
78
import { TypographyBold, TypographyP } from '@/components/ui/typography'
89

10+
export const metadata: Metadata = {
11+
title: 'ReactQRCode Props',
12+
description:
13+
'Full API reference for the ReactQRCode component in the @lglab/react-qr-code library, including all props and configuration options.',
14+
}
15+
916
const props: Prop[] = [
1017
{
1118
name: 'value',

apps/docs/src/app/robots.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { MetadataRoute } from 'next'
2+
3+
export default function robots(): MetadataRoute.Robots {
4+
return {
5+
rules: {
6+
userAgent: '*',
7+
allow: '/',
8+
},
9+
sitemap: 'https://reactqrcode.com/sitemap.xml',
10+
}
11+
}

0 commit comments

Comments
 (0)