From 9b49cd0b438f11f85ba0d94ec1faa616ef411866 Mon Sep 17 00:00:00 2001
From: Jonathan Reinink
Date: Sat, 1 Mar 2025 09:35:10 -0500
Subject: [PATCH 1/7] Add rewrites
---
next.config.ts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/next.config.ts b/next.config.ts
index 819f96f32..837deb76c 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -476,6 +476,18 @@ const nextConfig = {
{ source: "/discord", destination: "https://discord.gg/7NF8GNe", permanent: false },
];
},
+ async rewrites() {
+ return ["plus", "plus-assets", "vendor", "nova-api"].flatMap((path) => [
+ {
+ source: `/${path}`,
+ destination: `https://tailwindui.com/${path}`,
+ },
+ {
+ source: `/${path}/:path*`,
+ destination: `https://tailwindui.com/${path}/:path*`,
+ },
+ ]);
+ },
} satisfies NextConfig;
const withMDX = require("@next/mdx")();
From e18067afaba90b9f5d241aa3b6ff3bac7eab14a1 Mon Sep 17 00:00:00 2001
From: Jonathan Reinink
Date: Mon, 3 Mar 2025 09:14:38 -0500
Subject: [PATCH 2/7] Replace "Components" link in main nav with "Plus"
---
src/components/header.tsx | 67 ++++++++++++++++++++++++---------------
1 file changed, 42 insertions(+), 25 deletions(-)
diff --git a/src/components/header.tsx b/src/components/header.tsx
index 3cd5071d8..02dfef2d4 100644
--- a/src/components/header.tsx
+++ b/src/components/header.tsx
@@ -144,16 +144,18 @@ export function Header(props: React.PropsWithChildren) {
Ctrl K
- {[
- ["Docs", "/docs"],
- ["Components", "https://tailwindui.com/?ref=top"],
- ["Blog", "/blog"],
- ["Showcase", "/showcase"],
- ].map(([text, href]) => (
-
- {text}
-
- ))}
+
+ Docs
+
+
+ Plus
+
+
+ Blog
+
+
+ Showcase
+
@@ -190,21 +192,36 @@ export function Header(props: React.PropsWithChildren) {
- {[
- ["Docs", "/docs"],
- ["Components", "https://tailwindui.com/?ref=top"],
- ["Blog", "/blog"],
- ["Showcase", "/showcase"],
- ["GitHub", "https://github.com/tailwindlabs/tailwindcss"],
- ].map(([text, href]) => (
-
- {text}
-
- ))}
+
+ Docs
+
+
+ Plus
+
+
+ Blog
+
+
+ Showcase
+
+
+ GitHub
+
From 05832a6bdbfec8f5f96b7be0153861cf8aee627e Mon Sep 17 00:00:00 2001
From: Jonathan Reinink
Date: Mon, 3 Mar 2025 10:05:10 -0500
Subject: [PATCH 3/7] Update Plus links in docs nav
---
src/components/docs-sidebar.tsx | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/components/docs-sidebar.tsx b/src/components/docs-sidebar.tsx
index c5f04dd08..4388912ac 100644
--- a/src/components/docs-sidebar.tsx
+++ b/src/components/docs-sidebar.tsx
@@ -4,9 +4,11 @@ import Link, { LinkProps } from "next/link";
import index from "../app/(docs)/docs/index";
import { DocsSidebarLink } from "./docs-sidebar-link";
-export function TopNavLink(props: React.PropsWithChildren) {
+export function TopNavLink(props: { href: string } & React.ComponentPropsWithoutRef<"a">) {
+ const Component = props.href.startsWith("/plus") ? "a" : Link;
+
return (
-
-
+
-
+
+
+
+
+ UI Kit
+
+