8000 Merge pull request #2112 from immutable-js/optimize-seo · immutable-js/immutable-js@b9980ee · GitHub
[go: up one dir, main page]

Skip to content

Commit b9980ee

Browse files
authored
Merge pull request #2112 from immutable-js/optimize-seo
2 parents 0c07fb2 + cfa37ac commit b9980ee

File tree

4 files changed

+25
-99
lines changed

4 files changed

+25
-99
lines changed

website/src/app/docs/[version]/[type]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { getTypeDefs } from '../../../../static/getTypeDefs';
33
import { getVersionFromGitTag } from '../../../../static/getVersions';
44
import { TypeDocumentation } from '../../../../TypeDocumentation';
55
import { getVersionFromParams } from '../../../getVersionFromParams';
6+
import { VERSION } from '../../currentVersion';
67

78
export async function generateStaticParams() {
89
return getVersionFromGitTag()
@@ -36,6 +37,13 @@ export async function generateMetadata(props: Props) {
3637

3738
return {
3839
title: `${def.qualifiedName} — Immutable.js`,
40+
robots: {
41+
index: false,
42+
follow: true,
43+
},
44+
alternates: {
45+
canonical: `/docs/${VERSION}/${params.type}/`,
46+
},
3947
};
4048
}
4149

website/src/app/docs/[version]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { DocSearch } from '../../../DocSearch';
66
import { SideBar } from '../../../Sidebar';
77
import { getSidebarLinks } from '../../../getSidebarLinks';
88
import { getVersionFromParams } from '../../getVersionFromParams';
9+
import { VERSION } from '../currentVersion';
910

1011
export async function generateStaticParams() {
1112
return [...getVersionFromGitTag().map((version) => ({ version }))];
@@ -25,6 +26,13 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
2526

2627
return {
2728
title: `Documentation ${version} — Immutable.js`,
29+
robots: {
30+
index: false,
31+
follow: true,
32+
},
33+
alternates: {
34+
canonical: `/docs/${VERSION}/`,
35+
},
2836
};
2937
}
3038

website/src/app/docs/[version]/test/sandpack.tsx.bak

Lines changed: 0 additions & 99 deletions
This file was deleted.

website/src/app/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ import { ImmutableConsole } from '../ImmutableConsole';
44
import { MarkdownContent } from '../MarkdownContent';
55
import { genMarkdownDoc } from '../static/genMarkdownDoc';
66
import { getVersions } from '../static/getVersions';
7+
import { Metadata } from 'next';
8+
9+
export async function generateMetadata(): Promise<Metadata> {
10+
return {
11+
verification: {
12+
google: 'PdYYQG_2wv0zUJjqBIeuYliPcrOiAuTES4Q21OLy5uQ',
13+
},
14+
};
15+
}
716

817
export default async function Page() {
918
const versions = await getVersions();

0 commit comments

Comments
 (0)
0