Skip to content

Commit b15434b

Browse files
committed
Update Partners
1 parent 51b6c4d commit b15434b

File tree

9 files changed

+131
-16
lines changed

9 files changed

+131
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This site is built with TanStack Router!
44

55
- [TanStack Router Docs](https://tanstack.com/router)
66

7-
It's deployed automagically with Vercel!
7+
It's deployed automagically with Netlify!
88

9-
- [Vercel](https://vercel.com/)
9+
- [Netlify](https://netlify.com/)
1010

1111
## Development
1212

app/components/DocsLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ export function DocsLayout({
646646
<a
647647
href={partner.href}
648648
target="_blank"
649-
className="px-4 flex items-center justify-center cursor-pointer"
649+
className="px-4 flex flex-col items-center justify-center cursor-pointer gap-1"
650650
rel="noreferrer"
651651
>
652652
<div className="mx-auto max-w-[150px]">
@@ -672,6 +672,7 @@ export function DocsLayout({
672672
/>
673673
</div>
674674
</a>
675+
{partner.sidebarAfterImg || null}
675676
</div>
676677
)
677678
})

app/images/netlify-dark.svg

Lines changed: 22 additions & 0 deletions
Loading

app/images/netlify-light.svg

Lines changed: 22 additions & 0 deletions
Loading

app/libraries/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export type Library = {
6363
handleRedirects?: (href: string) => void
6464
hideCodesandboxUrl?: true
6565
hideStackblitzUrl?: true
66-
showVercelUrl?: true
66+
showVercelUrl?: boolean
67+
showNetlifyUrl?: boolean
6768
}
6869

6970
export const libraries = [
@@ -85,7 +86,7 @@ export function getLibrary(id: string) {
8586
throw new Error(`Library with id "${id}" not found`)
8687
}
8788

88-
return library
89+
return library as Library
8990
}
9091

9192
export function getFrameworkOptions(frameworkStrs: Framework[]) {

app/libraries/router.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export const routerProject = {
2222
scarfId: '3d14fff2-f326-4929-b5e1-6ecf953d24f4',
2323
defaultDocs: 'framework/react/overview',
2424
hideCodesandboxUrl: true,
25-
showVercelUrl: true,
25+
showVercelUrl: false,
26+
showNetlifyUrl: true,
2627
} satisfies Library

app/routes/$libraryId/$version.docs.framework.$framework.examples.$.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33

44
import { FaExternalLinkAlt } from 'react-icons/fa'
55
import { DocTitle } from '~/components/DocTitle'
6-
import { getBranch, getLibrary } from '~/libraries'
6+
import { Framework, getBranch, getLibrary } from '~/libraries'
77
import { getInitialSandboxFileName } from '~/utils/sandbox'
88
import { seo } from '~/utils/seo'
99
import { capitalize, slugToTitle } from '~/utils/utils'
@@ -41,7 +41,10 @@ export default function Example() {
4141
setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches)
4242
}, [])
4343

44-
const sandboxFirstFileName = getInitialSandboxFileName(framework, libraryId)
44+
const sandboxFirstFileName = getInitialSandboxFileName(
45+
framework as Framework,
46+
libraryId
47+
)
4548

4649
const githubUrl = `https://github.com/${library.repo}/tree/${branch}/examples/${examplePath}`
4750
// preset=node can be removed once Stackblitz runs Angular as webcontainer by default
@@ -60,15 +63,26 @@ export default function Example() {
6063
const hideCodesandbox = library.hideCodesandboxUrl
6164
const hideStackblitz = library.hideStackblitzUrl
6265
const showVercel = library.showVercelUrl
66+
const showNetlify = library.showNetlifyUrl
6367

6468
return (
6569
<div className="flex-1 flex flex-col min-h-0 overflow-auto">
6670
<div className="p-4 lg:p-6">
6771
<DocTitle>
6872
<span>
69-
{capitalize(framework)} Example: {slugToTitle(_splat)}
73+
{capitalize(framework)} Example: {slugToTitle(_splat!)}
7074
</span>
7175
<div className="flex items-center gap-4 flex-wrap font-normal text-xs">
76+
{showNetlify ? (
77+
<a
78+
href={`https://app.netlify.com/start/deploy?repository-url=${githubUrl}`}
79+
>
80+
<img
81+
src="https://www.netlify.com/img/deploy/button.svg"
82+
alt="Deploy with Netlify"
83+
/>
84+
</a>
85+
) : null}
7286
{showVercel ? (
7387
<a
7488
href={`https://vercel.com/new/clone?repository-url=${githubUrl}`}

app/utils/partners.tsx

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import nozzleImage from '~/images/nozzle.png'
77
import nozzleDarkSvg from '~/images/nozzle-dark.svg'
88
import nozzleLightSvg from '~/images/nozzle-light.svg'
99
import bytesUidotdevImage from '~/images/bytes-uidotdev.png'
10-
import vercelLightSvg from '~/images/vercel-light.svg'
11-
import vercelDarkSvg from '~/images/vercel-dark.svg'
10+
// import vercelLightSvg from '~/images/vercel-light.svg'
11+
// import vercelDarkSvg from '~/images/vercel-dark.svg'
12+
import netlifyLightSvg from '~/images/netlify-light.svg'
13+
import netlifyDarkSvg from '~/images/netlify-dark.svg'
1214
import convexWhiteSvg from '~/images/convex-white.svg'
1315
import convexColorSvg from '~/images/convex-color.svg'
1416
import clerkLightSvg from '~/images/clerk-logo-light.svg'
@@ -165,6 +167,63 @@ export const partners: Partner[] = [
165167
),
166168
}
167169
})(),
170+
(() => {
171+
const href = 'https://netlify.com?utm_source=tanstack'
172+
173+
return {
174+
name: 'Netlify',
175+
id: 'netlify',
176+
libraries: ['start', 'router'],
177+
sidebarImgLight: netlifyLightSvg,
178+
sidebarImgDark: netlifyDarkSvg,
179+
sidebarImgClass: 'pt-2 scale-[.9]',
180+
sidebarAfterImg: (
181+
<div className="text-[10px] text-center py-1 px-2 w-full bg-gradient-to-b from-transparent to-gray-500/10 uppercase font-bold">
182+
Official Deployment Partner
183+
</div>
184+
),
185+
href,
186+
homepageImg: (
187+
<div className="flex flex-col justify-center items-center pb-4 gap-2 dark:bg-gray-900 w-full">
188+
<div className="w-full h-full flex items-center justify-center px-4 pt-6 pb-2">
189+
<img
190+
src={netlifyLightSvg}
191+
alt="Convex"
192+
className="w-[280px] max-w-full dark:hidden"
193+
/>
194+
<img
195+
src={netlifyDarkSvg}
196+
alt="Convex"
197+
className="w-[280px] max-w-full hidden dark:block"
198+
/>
199+
</div>
200+
<div className="w-auto text-xs text-center py-1 px-3 rounded-full uppercase font-bold m-2 bg-[#03bdba] text-white ">
201+
Official Deployment Partner
202+
</div>
203+
</div>
204+
),
205+
content: (
206+
<>
207+
<div className="text-xs">
208+
Netlify and TanStack have joined forces to provide developers with{' '}
209+
<strong>world-class deployment and hosting capabilities</strong> for
210+
modern web applications. Together we're focused on delivering an
211+
exceptional developer experience through{' '}
212+
<strong>
213+
seamless deployment workflows, edge functions, and serverless
214+
capabilities
215+
</strong>{' '}
216+
that help teams build and ship faster. Our partnership ensures
217+
TanStack applications can take full advantage of Netlify's powerful
218+
platform features.
219+
</div>
220+
<span className="text-blue-500 uppercase font-black text-sm">
221+
Learn More
222+
</span>
223+
</>
224+
),
225+
}
226+
})(),
168227
(() => {
169228
const href = 'https://sentry.io?utm_source=tanstack'
170229

vercel.json

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

0 commit comments

Comments
 (0)