Skip to content

Commit 7587648

Browse files
KianNHdaisyfaithauma
authored andcommitted
[Docs Site] Upgrade to Tailwind v4 (#21744)
* [Docs Site] Upgrade to Tailwind v4 * delete learning-paths/index.mdx * update deps * include css in class scanning * fix ts errors * make tailwind.css the first customCss file * fix formatting * fix learning paths line height * changelog header border * bump deps
1 parent 0680ff8 commit 7587648

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1366
-1853
lines changed

astro.config.ts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { defineConfig } from "astro/config";
22
import starlight from "@astrojs/starlight";
3-
import tailwind from "@astrojs/tailwind";
43
import starlightDocSearch from "@astrojs/starlight-docsearch";
54
import starlightImageZoom from "starlight-image-zoom";
65
import liveCode from "astro-live-code";
@@ -45,7 +44,8 @@ async function autogenStyles() {
4544
})
4645
)
4746
.filter((x) => x.isFile())
48-
.map((x) => x.parentPath + x.name);
47+
.map((x) => x.parentPath + x.name)
48+
.sort((a) => (a === "./src/styles/tailwind.css" ? -1 : 1));
4949

5050
return styles;
5151
}
@@ -90,11 +90,19 @@ export default defineConfig({
9090
src: "./src/assets/logo.svg",
9191
},
9292
favicon: "/favicon.png",
93-
social: {
94-
github: "https://github.com/cloudflare/cloudflare-docs",
95-
"x.com": "https://x.com/cloudflare",
96-
youtube: "https://www.youtube.com/cloudflare",
97-
},
93+
social: [
94+
{
95+
label: "GitHub",
96+
icon: "github",
97+
href: "https://github.com/cloudflare/cloudflare-docs",
98+
},
99+
{ label: "X.com", icon: "x.com", href: "https://x.com/cloudflare" },
100+
{
101+
label: "YouTube",
102+
icon: "youtube",
103+
href: "https://www.youtube.com/cloudflare",
104+
},
105+
],
98106
editLink: {
99107
baseUrl:
100108
"https://github.com/cloudflare/cloudflare-docs/edit/production/",
@@ -143,9 +151,9 @@ export default defineConfig({
143151
starlightImageZoom(),
144152
],
145153
lastUpdated: true,
146-
}),
147-
tailwind({
148-
applyBaseStyles: false,
154+
markdown: {
155+
headingLinks: false,
156+
},
149157
}),
150158
liveCode({}),
151159
icon(),

0 commit comments

Comments
 (0)