Skip to content

fix: update astro installation guide #2159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 32 additions & 1 deletion src/app/(docs)/docs/installation/framework-guides/astro.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { astro, css, js, Page, shell, Step, Tile } from "./utils";
import { astro, css, js, Page, shell, Step, Tab, Tile } from "./utils";
import Logo from "@/docs/img/guides/astro.react.svg";
import LogoDark from "@/docs/img/guides/astro-white.react.svg";

Expand All @@ -14,6 +14,17 @@ export let page: Page = {
description: "Setting up Tailwind CSS in an Astro project.",
};

export let tabs: Tab[] = [
{
slug: "command",
title: "Using command (v5.2.0 or later)",
},
{
slug: "manual",
title: "Manual installation",
},
];

export let steps: Step[] = [
{
title: "Create your project",
Expand All @@ -33,6 +44,24 @@ export let steps: Step[] = [
},
},
{
tabs: ["command"],
title: "Run `astro add` command",
body: (
<p>
Run this command to install all the necessary dependencies, create a <code>./src/styles/global.css</code> file,
and add the plugin to your Astro configuration file.
</p>
),
code: {
name: "Terminal",
lang: "shell",
code: shell`
npx astro add tailwind
`,
},
},
{
tabs: ["manual"],
title: "Install Tailwind CSS",
body: (
<p>
Expand All @@ -48,6 +77,7 @@ export let steps: Step[] = [
},
},
{
tabs: ["manual"],
title: "Configure Vite Plugin",
body: (
<p>
Expand All @@ -74,6 +104,7 @@ export let steps: Step[] = [
},
},
{
tabs: ["manual"],
title: "Import Tailwind CSS",
body: (
<p>
Expand Down