Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/libraries/libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ export const query: LibrarySlim = {
scarfId: '53afb586-3934-4624-a37a-e680c1528e17',
ogImage: 'https://github.com/tanstack/query/raw/main/media/repo-header.png',
defaultDocs: 'framework/react/overview',
sitemap: {
includeLandingPage: true,
includeTopLevelDocsPages: true,
},
installPath: 'framework/$framework/installation',
legacyPackages: ['react-query'],
handleRedirects: (href) => {
Expand Down Expand Up @@ -221,10 +217,6 @@ export const router: LibrarySlim = {
scarfId: '3d14fff2-f326-4929-b5e1-6ecf953d24f4',
ogImage: 'https://github.com/tanstack/router/raw/main/media/header.png',
docsRoot: 'docs/router',
sitemap: {
includeLandingPage: true,
includeTopLevelDocsPages: true,
},
legacyPackages: ['react-location'],
hideCodesandboxUrl: true,
handleRedirects: (href) => {
Expand Down Expand Up @@ -290,10 +282,6 @@ export const start: LibrarySlim = {
scarfId: 'b6e2134f-e805-401d-95c3-2a7765d49a3d',
docsRoot: 'docs/start',
defaultDocs: 'framework/react/overview',
sitemap: {
includeLandingPage: true,
includeTopLevelDocsPages: true,
},
installPath: 'framework/$framework/build-from-scratch',
embedEditor: 'codesandbox',
showNetlifyUrl: true,
Expand Down Expand Up @@ -335,10 +323,6 @@ export const table: LibrarySlim = {
scarfId: 'dc8b39e1-3fe9-4f3a-8e56-d4e2cf420a9e',
ogImage: 'https://github.com/tanstack/table/raw/main/media/repo-header.png',
defaultDocs: 'introduction',
sitemap: {
includeLandingPage: true,
includeTopLevelDocsPages: true,
},
corePackageName: '@tanstack/table-core',
legacyPackages: ['react-table'],
handleRedirects: (href) => {
Expand Down Expand Up @@ -408,10 +392,6 @@ export const form: LibrarySlim = {
availableVersions: ['v1'],
scarfId: '72ec4452-5d77-427c-b44a-57515d2d83aa',
ogImage: 'https://github.com/tanstack/form/raw/main/media/repo-header.png',
sitemap: {
includeLandingPage: true,
includeTopLevelDocsPages: true,
},
}

export const virtual: LibrarySlim = {
Expand Down Expand Up @@ -576,9 +556,6 @@ export const db: LibrarySlim = {
scarfId: '302d0fef-cb3f-43c6-b45c-f055b9745edb',
ogImage: 'https://github.com/tanstack/db/raw/main/media/repo-header.png',
defaultDocs: 'overview',
sitemap: {
includeLandingPage: true,
},
}

export const ai: LibrarySlim = {
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ export type LibrarySlim = {
* Defaults to true.
*/
visible?: boolean
sitemap?: {
includeLandingPage?: boolean
includeTopLevelDocsPages?: boolean
}
}

// Extended library type - adds React node content for landing pages
Expand Down
42 changes: 0 additions & 42 deletions src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import { Route as TermsRouteImport } from './routes/terms'
import { Route as TenetsRouteImport } from './routes/tenets'
import { Route as SupportRouteImport } from './routes/support'
import { Route as SponsorsEmbedRouteImport } from './routes/sponsors-embed'
import { Route as SitemapDotxmlRouteImport } from './routes/sitemap[.]xml'
import { Route as RssDotxmlRouteImport } from './routes/rss[.]xml'
import { Route as RobotsDottxtRouteImport } from './routes/robots[.]txt'
import { Route as PrivacyRouteImport } from './routes/privacy'
import { Route as PartnersEmbedRouteImport } from './routes/partners-embed'
import { Route as PartnersRouteImport } from './routes/partners'
Expand Down Expand Up @@ -146,21 +144,11 @@ const SponsorsEmbedRoute = SponsorsEmbedRouteImport.update({
path: '/sponsors-embed',
getParentRoute: () => rootRouteImport,
} as any)
const SitemapDotxmlRoute = SitemapDotxmlRouteImport.update({
id: '/sitemap.xml',
path: '/sitemap.xml',
getParentRoute: () => rootRouteImport,
} as any)
const RssDotxmlRoute = RssDotxmlRouteImport.update({
id: '/rss.xml',
path: '/rss.xml',
getParentRoute: () => rootRouteImport,
} as any)
const RobotsDottxtRoute = RobotsDottxtRouteImport.update({
id: '/robots.txt',
path: '/robots.txt',
getParentRoute: () => rootRouteImport,
} as any)
const PrivacyRoute = PrivacyRouteImport.update({
id: '/privacy',
path: '/privacy',
Expand Down Expand Up @@ -722,9 +710,7 @@ export interface FileRoutesByFullPath {
'/partners': typeof PartnersRoute
'/partners-embed': typeof PartnersEmbedRoute
'/privacy': typeof PrivacyRoute
'/robots.txt': typeof RobotsDottxtRoute
'/rss.xml': typeof RssDotxmlRoute
'/sitemap.xml': typeof SitemapDotxmlRoute
'/sponsors-embed': typeof SponsorsEmbedRoute
'/support': typeof SupportRoute
'/tenets': typeof TenetsRoute
Expand Down Expand Up @@ -830,9 +816,7 @@ export interface FileRoutesByTo {
'/partners': typeof PartnersRoute
'/partners-embed': typeof PartnersEmbedRoute
'/privacy': typeof PrivacyRoute
'/robots.txt': typeof RobotsDottxtRoute
'/rss.xml': typeof RssDotxmlRoute
'/sitemap.xml': typeof SitemapDotxmlRoute
'/sponsors-embed': typeof SponsorsEmbedRoute
'/support': typeof SupportRoute
'/tenets': typeof TenetsRoute
Expand Down Expand Up @@ -941,9 +925,7 @@ export interface FileRoutesById {
'/partners': typeof PartnersRoute
'/partners-embed': typeof PartnersEmbedRoute
'/privacy': typeof PrivacyRoute
'/robots.txt': typeof RobotsDottxtRoute
'/rss.xml': typeof RssDotxmlRoute
'/sitemap.xml': typeof SitemapDotxmlRoute
'/sponsors-embed': typeof SponsorsEmbedRoute
'/support': typeof SupportRoute
'/tenets': typeof TenetsRoute
Expand Down Expand Up @@ -1056,9 +1038,7 @@ export interface FileRouteTypes {
| '/partners'
| '/partners-embed'
| '/privacy'
| '/robots.txt'
| '/rss.xml'
| '/sitemap.xml'
| '/sponsors-embed'
| '/support'
| '/tenets'
Expand Down Expand Up @@ -1164,9 +1144,7 @@ export interface FileRouteTypes {
| '/partners'
| '/partners-embed'
| '/privacy'
| '/robots.txt'
| '/rss.xml'
| '/sitemap.xml'
| '/sponsors-embed'
| '/support'
| '/tenets'
Expand Down Expand Up @@ -1274,9 +1252,7 @@ export interface FileRouteTypes {
| '/partners'
| '/partners-embed'
| '/privacy'
| '/robots.txt'
| '/rss.xml'
| '/sitemap.xml'
| '/sponsors-embed'
| '/support'
| '/tenets'
Expand Down Expand Up @@ -1388,9 +1364,7 @@ export interface RootRouteChildren {
PartnersRoute: typeof PartnersRoute
PartnersEmbedRoute: typeof PartnersEmbedRoute
PrivacyRoute: typeof PrivacyRoute
RobotsDottxtRoute: typeof RobotsDottxtRoute
RssDotxmlRoute: typeof RssDotxmlRoute
SitemapDotxmlRoute: typeof SitemapDotxmlRoute
SponsorsEmbedRoute: typeof SponsorsEmbedRoute
SupportRoute: typeof SupportRoute
TenetsRoute: typeof TenetsRoute
Expand Down Expand Up @@ -1474,27 +1448,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof SponsorsEmbedRouteImport
parentRoute: typeof rootRouteImport
}
'/sitemap.xml': {
id: '/sitemap.xml'
path: '/sitemap.xml'
fullPath: '/sitemap.xml'
preLoaderRoute: typeof SitemapDotxmlRouteImport
parentRoute: typeof rootRouteImport
}
'/rss.xml': {
id: '/rss.xml'
path: '/rss.xml'
fullPath: '/rss.xml'
preLoaderRoute: typeof RssDotxmlRouteImport
parentRoute: typeof rootRouteImport
}
'/robots.txt': {
id: '/robots.txt'
path: '/robots.txt'
fullPath: '/robots.txt'
preLoaderRoute: typeof RobotsDottxtRouteImport
parentRoute: typeof rootRouteImport
}
'/privacy': {
id: '/privacy'
path: '/privacy'
Expand Down Expand Up @@ -2419,9 +2379,7 @@ const rootRouteChildren: RootRouteChildren = {
PartnersRoute: PartnersRoute,
PartnersEmbedRoute: PartnersEmbedRoute,
PrivacyRoute: PrivacyRoute,
RobotsDottxtRoute: RobotsDottxtRoute,
RssDotxmlRoute: RssDotxmlRoute,
SitemapDotxmlRoute: SitemapDotxmlRoute,
SponsorsEmbedRoute: SponsorsEmbedRoute,
SupportRoute: SupportRoute,
TenetsRoute: TenetsRoute,
Expand Down
19 changes: 1 addition & 18 deletions src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
} from '@tanstack/react-router'
import { QueryClient } from '@tanstack/react-query'
import appCss from '~/styles/app.css?url'
import {
canonicalUrl,
getCanonicalPath,
seo,
shouldIndexPath,
} from '~/utils/seo'
import { seo } from '~/utils/seo'
import ogImage from '~/images/og.png'
const LazyRouterDevtools = React.lazy(() =>
import('@tanstack/react-router-devtools').then((m) => ({
Expand Down Expand Up @@ -160,12 +155,6 @@ function ShellComponent({ children }: { children: React.ReactNode }) {
select: (s) => s.resolvedLocation?.pathname.startsWith('/router'),
})

const canonicalPath = useRouterState({
select: (s) => s.resolvedLocation?.pathname || '/',
})

const preferredCanonicalPath = getCanonicalPath(canonicalPath)

const showDevtools = canShowLoading && isRouterPage

const hideNavbar = useMatches({
Expand All @@ -177,12 +166,6 @@ function ShellComponent({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className={htmlClass} suppressHydrationWarning>
<head>
{preferredCanonicalPath ? (
<link rel="canonical" href={canonicalUrl(preferredCanonicalPath)} />
) : null}
{!shouldIndexPath(canonicalPath) ? (
<meta name="robots" content="noindex, nofollow" />
) : null}
<HeadContent />
{hasBaseParent ? <base target="_parent" /> : null}
</head>
Expand Down
25 changes: 0 additions & 25 deletions src/routes/robots[.]txt.ts

This file was deleted.

18 changes: 1 addition & 17 deletions src/routes/showcase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ const searchSchema = v.object({

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

function hasNonCanonicalSearch(search: v.InferOutput<typeof searchSchema>) {
return Boolean(
search.page > 1 ||
search.pageSize !== PAGE_SIZE_OPTIONS[0] ||
search.libraryIds?.length ||
search.useCases?.length ||
search.hasSourceCode ||
search.q,
)
}

export const Route = createFileRoute('/showcase/')({
validateSearch: searchSchema,
loaderDeps: ({ search }) => ({
Expand All @@ -52,18 +41,13 @@ export const Route = createFileRoute('/showcase/')({
},
}),
)

return {
hasNonCanonicalSearch: hasNonCanonicalSearch(deps),
}
},
component: ShowcaseGallery,
head: ({ loaderData }) => ({
head: () => ({
meta: seo({
title: 'Showcase | TanStack',
description:
'Discover projects built with TanStack libraries. See how developers are using TanStack Query, Router, Table, Form, and more in production.',
noindex: loaderData?.hasNonCanonicalSearch,
}),
}),
})
25 changes: 0 additions & 25 deletions src/routes/sitemap[.]xml.ts

This file was deleted.

Loading
Loading