Skip to content

Commit 4ef5d30

Browse files
Revert "feat: sitemap / robots.txt (#783)"
This reverts commit 333b238.
1 parent 333b238 commit 4ef5d30

File tree

9 files changed

+9
-406
lines changed

9 files changed

+9
-406
lines changed

src/libraries/libraries.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ export const query: LibrarySlim = {
3030
scarfId: '53afb586-3934-4624-a37a-e680c1528e17',
3131
ogImage: 'https://github.com/tanstack/query/raw/main/media/repo-header.png',
3232
defaultDocs: 'framework/react/overview',
33-
sitemap: {
34-
includeLandingPage: true,
35-
includeTopLevelDocsPages: true,
36-
},
3733
installPath: 'framework/$framework/installation',
3834
legacyPackages: ['react-query'],
3935
handleRedirects: (href) => {
@@ -221,10 +217,6 @@ export const router: LibrarySlim = {
221217
scarfId: '3d14fff2-f326-4929-b5e1-6ecf953d24f4',
222218
ogImage: 'https://github.com/tanstack/router/raw/main/media/header.png',
223219
docsRoot: 'docs/router',
224-
sitemap: {
225-
includeLandingPage: true,
226-
includeTopLevelDocsPages: true,
227-
},
228220
legacyPackages: ['react-location'],
229221
hideCodesandboxUrl: true,
230222
handleRedirects: (href) => {
@@ -290,10 +282,6 @@ export const start: LibrarySlim = {
290282
scarfId: 'b6e2134f-e805-401d-95c3-2a7765d49a3d',
291283
docsRoot: 'docs/start',
292284
defaultDocs: 'framework/react/overview',
293-
sitemap: {
294-
includeLandingPage: true,
295-
includeTopLevelDocsPages: true,
296-
},
297285
installPath: 'framework/$framework/build-from-scratch',
298286
embedEditor: 'codesandbox',
299287
showNetlifyUrl: true,
@@ -335,10 +323,6 @@ export const table: LibrarySlim = {
335323
scarfId: 'dc8b39e1-3fe9-4f3a-8e56-d4e2cf420a9e',
336324
ogImage: 'https://github.com/tanstack/table/raw/main/media/repo-header.png',
337325
defaultDocs: 'introduction',
338-
sitemap: {
339-
includeLandingPage: true,
340-
includeTopLevelDocsPages: true,
341-
},
342326
corePackageName: '@tanstack/table-core',
343327
legacyPackages: ['react-table'],
344328
handleRedirects: (href) => {
@@ -408,10 +392,6 @@ export const form: LibrarySlim = {
408392
availableVersions: ['v1'],
409393
scarfId: '72ec4452-5d77-427c-b44a-57515d2d83aa',
410394
ogImage: 'https://github.com/tanstack/form/raw/main/media/repo-header.png',
411-
sitemap: {
412-
includeLandingPage: true,
413-
includeTopLevelDocsPages: true,
414-
},
415395
}
416396

417397
export const virtual: LibrarySlim = {
@@ -576,9 +556,6 @@ export const db: LibrarySlim = {
576556
scarfId: '302d0fef-cb3f-43c6-b45c-f055b9745edb',
577557
ogImage: 'https://github.com/tanstack/db/raw/main/media/repo-header.png',
578558
defaultDocs: 'overview',
579-
sitemap: {
580-
includeLandingPage: true,
581-
},
582559
}
583560

584561
export const ai: LibrarySlim = {

src/libraries/types.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ export type LibrarySlim = {
7979
* Defaults to true.
8080
*/
8181
visible?: boolean
82-
sitemap?: {
83-
includeLandingPage?: boolean
84-
includeTopLevelDocsPages?: boolean
85-
}
8682
}
8783

8884
// Extended library type - adds React node content for landing pages

src/routeTree.gen.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import { Route as TermsRouteImport } from './routes/terms'
1414
import { Route as TenetsRouteImport } from './routes/tenets'
1515
import { Route as SupportRouteImport } from './routes/support'
1616
import { Route as SponsorsEmbedRouteImport } from './routes/sponsors-embed'
17-
import { Route as SitemapDotxmlRouteImport } from './routes/sitemap[.]xml'
1817
import { Route as RssDotxmlRouteImport } from './routes/rss[.]xml'
19-
import { Route as RobotsDottxtRouteImport } from './routes/robots[.]txt'
2018
import { Route as PrivacyRouteImport } from './routes/privacy'
2119
import { Route as PartnersEmbedRouteImport } from './routes/partners-embed'
2220
import { Route as PartnersRouteImport } from './routes/partners'
@@ -146,21 +144,11 @@ const SponsorsEmbedRoute = SponsorsEmbedRouteImport.update({
146144
path: '/sponsors-embed',
147145
getParentRoute: () => rootRouteImport,
148146
} as any)
149-
const SitemapDotxmlRoute = SitemapDotxmlRouteImport.update({
150-
id: '/sitemap.xml',
151-
path: '/sitemap.xml',
152-
getParentRoute: () => rootRouteImport,
153-
} as any)
154147
const RssDotxmlRoute = RssDotxmlRouteImport.update({
155148
id: '/rss.xml',
156149
path: '/rss.xml',
157150
getParentRoute: () => rootRouteImport,
158151
} as any)
159-
const RobotsDottxtRoute = RobotsDottxtRouteImport.update({
160-
id: '/robots.txt',
161-
path: '/robots.txt',
162-
getParentRoute: () => rootRouteImport,
163-
} as any)
164152
const PrivacyRoute = PrivacyRouteImport.update({
165153
id: '/privacy',
166154
path: '/privacy',
@@ -722,9 +710,7 @@ export interface FileRoutesByFullPath {
722710
'/partners': typeof PartnersRoute
723711
'/partners-embed': typeof PartnersEmbedRoute
724712
'/privacy': typeof PrivacyRoute
725-
'/robots.txt': typeof RobotsDottxtRoute
726713
'/rss.xml': typeof RssDotxmlRoute
727-
'/sitemap.xml': typeof SitemapDotxmlRoute
728714
'/sponsors-embed': typeof SponsorsEmbedRoute
729715
'/support': typeof SupportRoute
730716
'/tenets': typeof TenetsRoute
@@ -830,9 +816,7 @@ export interface FileRoutesByTo {
830816
'/partners': typeof PartnersRoute
831817
'/partners-embed': typeof PartnersEmbedRoute
832818
'/privacy': typeof PrivacyRoute
833-
'/robots.txt': typeof RobotsDottxtRoute
834819
'/rss.xml': typeof RssDotxmlRoute
835-
'/sitemap.xml': typeof SitemapDotxmlRoute
836820
'/sponsors-embed': typeof SponsorsEmbedRoute
837821
'/support': typeof SupportRoute
838822
'/tenets': typeof TenetsRoute
@@ -941,9 +925,7 @@ export interface FileRoutesById {
941925
'/partners': typeof PartnersRoute
942926
'/partners-embed': typeof PartnersEmbedRoute
943927
'/privacy': typeof PrivacyRoute
944-
'/robots.txt': typeof RobotsDottxtRoute
945928
'/rss.xml': typeof RssDotxmlRoute
946-
'/sitemap.xml': typeof SitemapDotxmlRoute
947929
'/sponsors-embed': typeof SponsorsEmbedRoute
948930
'/support': typeof SupportRoute
949931
'/tenets': typeof TenetsRoute
@@ -1056,9 +1038,7 @@ export interface FileRouteTypes {
10561038
| '/partners'
10571039
| '/partners-embed'
10581040
| '/privacy'
1059-
| '/robots.txt'
10601041
| '/rss.xml'
1061-
| '/sitemap.xml'
10621042
| '/sponsors-embed'
10631043
| '/support'
10641044
| '/tenets'
@@ -1164,9 +1144,7 @@ export interface FileRouteTypes {
11641144
| '/partners'
11651145
| '/partners-embed'
11661146
| '/privacy'
1167-
| '/robots.txt'
11681147
| '/rss.xml'
1169-
| '/sitemap.xml'
11701148
| '/sponsors-embed'
11711149
| '/support'
11721150
| '/tenets'
@@ -1274,9 +1252,7 @@ export interface FileRouteTypes {
12741252
| '/partners'
12751253
| '/partners-embed'
12761254
| '/privacy'
1277-
| '/robots.txt'
12781255
| '/rss.xml'
1279-
| '/sitemap.xml'
12801256
| '/sponsors-embed'
12811257
| '/support'
12821258
| '/tenets'
@@ -1388,9 +1364,7 @@ export interface RootRouteChildren {
13881364
PartnersRoute: typeof PartnersRoute
13891365
PartnersEmbedRoute: typeof PartnersEmbedRoute
13901366
PrivacyRoute: typeof PrivacyRoute
1391-
RobotsDottxtRoute: typeof RobotsDottxtRoute
13921367
RssDotxmlRoute: typeof RssDotxmlRoute
1393-
SitemapDotxmlRoute: typeof SitemapDotxmlRoute
13941368
SponsorsEmbedRoute: typeof SponsorsEmbedRoute
13951369
SupportRoute: typeof SupportRoute
13961370
TenetsRoute: typeof TenetsRoute
@@ -1474,27 +1448,13 @@ declare module '@tanstack/react-router' {
14741448
preLoaderRoute: typeof SponsorsEmbedRouteImport
14751449
parentRoute: typeof rootRouteImport
14761450
}
1477-
'/sitemap.xml': {
1478-
id: '/sitemap.xml'
1479-
path: '/sitemap.xml'
1480-
fullPath: '/sitemap.xml'
1481-
preLoaderRoute: typeof SitemapDotxmlRouteImport
1482-
parentRoute: typeof rootRouteImport
1483-
}
14841451
'/rss.xml': {
14851452
id: '/rss.xml'
14861453
path: '/rss.xml'
14871454
fullPath: '/rss.xml'
14881455
preLoaderRoute: typeof RssDotxmlRouteImport
14891456
parentRoute: typeof rootRouteImport
14901457
}
1491-
'/robots.txt': {
1492-
id: '/robots.txt'
1493-
path: '/robots.txt'
1494-
fullPath: '/robots.txt'
1495-
preLoaderRoute: typeof RobotsDottxtRouteImport
1496-
parentRoute: typeof rootRouteImport
1497-
}
14981458
'/privacy': {
14991459
id: '/privacy'
15001460
path: '/privacy'
@@ -2419,9 +2379,7 @@ const rootRouteChildren: RootRouteChildren = {
24192379
PartnersRoute: PartnersRoute,
24202380
PartnersEmbedRoute: PartnersEmbedRoute,
24212381
PrivacyRoute: PrivacyRoute,
2422-
RobotsDottxtRoute: RobotsDottxtRoute,
24232382
RssDotxmlRoute: RssDotxmlRoute,
2424-
SitemapDotxmlRoute: SitemapDotxmlRoute,
24252383
SponsorsEmbedRoute: SponsorsEmbedRoute,
24262384
SupportRoute: SupportRoute,
24272385
TenetsRoute: TenetsRoute,

src/routes/__root.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ import {
99
} from '@tanstack/react-router'
1010
import { QueryClient } from '@tanstack/react-query'
1111
import appCss from '~/styles/app.css?url'
12-
import {
13-
canonicalUrl,
14-
getCanonicalPath,
15-
seo,
16-
shouldIndexPath,
17-
} from '~/utils/seo'
12+
import { seo } from '~/utils/seo'
1813
import ogImage from '~/images/og.png'
1914
const LazyRouterDevtools = React.lazy(() =>
2015
import('@tanstack/react-router-devtools').then((m) => ({
@@ -160,12 +155,6 @@ function ShellComponent({ children }: { children: React.ReactNode }) {
160155
select: (s) => s.resolvedLocation?.pathname.startsWith('/router'),
161156
})
162157

163-
const canonicalPath = useRouterState({
164-
select: (s) => s.resolvedLocation?.pathname || '/',
165-
})
166-
167-
const preferredCanonicalPath = getCanonicalPath(canonicalPath)
168-
169158
const showDevtools = canShowLoading && isRouterPage
170159

171160
const hideNavbar = useMatches({
@@ -177,12 +166,6 @@ function ShellComponent({ children }: { children: React.ReactNode }) {
177166
return (
178167
<html lang="en" className={htmlClass} suppressHydrationWarning>
179168
<head>
180-
{preferredCanonicalPath ? (
181-
<link rel="canonical" href={canonicalUrl(preferredCanonicalPath)} />
182-
) : null}
183-
{!shouldIndexPath(canonicalPath) ? (
184-
<meta name="robots" content="noindex, nofollow" />
185-
) : null}
186169
<HeadContent />
187170
{hasBaseParent ? <base target="_parent" /> : null}
188171
</head>

src/routes/robots[.]txt.ts

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

src/routes/showcase/index.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ const searchSchema = v.object({
1616

1717
export const PAGE_SIZE_OPTIONS = [24, 48, 96, 192] as const
1818

19-
function hasNonCanonicalSearch(search: v.InferOutput<typeof searchSchema>) {
20-
return Boolean(
21-
search.page > 1 ||
22-
search.pageSize !== PAGE_SIZE_OPTIONS[0] ||
23-
search.libraryIds?.length ||
24-
search.useCases?.length ||
25-
search.hasSourceCode ||
26-
search.q,
27-
)
28-
}
29-
3019
export const Route = createFileRoute('/showcase/')({
3120
validateSearch: searchSchema,
3221
loaderDeps: ({ search }) => ({
@@ -52,18 +41,13 @@ export const Route = createFileRoute('/showcase/')({
5241
},
5342
}),
5443
)
55-
56-
return {
57-
hasNonCanonicalSearch: hasNonCanonicalSearch(deps),
58-
}
5944
},
6045
component: ShowcaseGallery,
61-
head: ({ loaderData }) => ({
46+
head: () => ({
6247
meta: seo({
6348
title: 'Showcase | TanStack',
6449
description:
6550
'Discover projects built with TanStack libraries. See how developers are using TanStack Query, Router, Table, Form, and more in production.',
66-
noindex: loaderData?.hasNonCanonicalSearch,
6751
}),
6852
}),
6953
})

src/routes/sitemap[.]xml.ts

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

0 commit comments

Comments
 (0)