Skip to content

Commit 166c974

Browse files
committed
SEO fix for missing metadata
1 parent d00cbea commit 166c974

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

src/app/docs/javascript/page.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ import { Layout } from '../../../components/_layout'
99
import props from '../../../../schema/javascript.json'
1010
import { OnThisPageContent } from '@/components/_onThisPage'
1111
import { useEffect, useState } from 'react'
12+
import { Metadata } from 'next'
13+
14+
export const metadata: Metadata = {
15+
title: 'TerminusDB Javascript Client API Reference',
16+
description: 'TerminusDB Javascript Client API Reference documentation with every function and example for AccessControl, WOQLQuery, WOQLLibrary, View and WOQL.',
17+
metadataBase: new URL('https://terminusdb.org'),
18+
alternates: {
19+
canonical: '/docs/javascript/',
20+
},
21+
}
1222

1323
export default function JavaScript() {
1424
const [onPageContent, setOnPageContent] = useState<JSX.Element | null>(null)

src/app/docs/openapi/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ import { SwaggerDark } from './SwaggerDark'
44
import { SwaggerLight } from './SwaggerLight'
55
import { useEffect, useState } from 'react'
66
import { useMediaQuery } from 'usehooks-ts'
7+
import { Metadata } from 'next'
78
// const SwaggerUI = dynamic(import('swagger-ui-react'), { ssr: false })
89

10+
export const metadata: Metadata = {
11+
title: 'TerminusDB OpenAPI API reference',
12+
description: 'TerminusDB OpenAPI spec documentation with every API call and associated examples and information',
13+
metadataBase: new URL('https://terminusdb.org'),
14+
alternates: {
15+
canonical: '/docs/openapi/',
16+
},
17+
}
18+
19+
920
const OpenApi = () => {
1021
return (
1122
<div className="w-full max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">

src/app/docs/python/page.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,19 @@ import {
55
formatShortHandAnchorIds,
66
formatAnchorIds,
77
} from '../../../utils'
8-
import menu from '../../../menu.json'
9-
import { Layout } from '../../../components/_layout'
108
import props from '../../../../schema/python.json'
119
import { OnThisPageContent } from '@/components/_onThisPage'
1210
import { useEffect, useState } from 'react'
11+
import { Metadata } from 'next'
12+
13+
export const metadata: Metadata = {
14+
title: 'TerminusDB Python Client API Reference',
15+
description: 'TerminusDB Python Client API Reference documentation with every function and example for the Python Client library.',
16+
metadataBase: new URL('https://terminusdb.org'),
17+
alternates: {
18+
canonical: '/docs/python/',
19+
},
20+
}
1321

1422
export default function Python() {
1523
const [onPageContent, setOnPageContent] = useState<JSX.Element | null>(null)

src/app/not-found.tsx

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

4+
export const metadata: Metadata = {
5+
title: 'TerminusDB Page Not Found',
6+
description: 'TerminusDB 404 Page Not Found page, hope you find what you are looking for at our other pages and through the base homepage',
7+
metadataBase: new URL('https://terminusdb.org'),
8+
alternates: {
9+
canonical: '/404/',
10+
},
11+
}
12+
13+
314
export default function NotFound() {
415
return (
516
<div className="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">

0 commit comments

Comments
 (0)