From 82200d5f94b1c90d1c78dd0029f0004e846812aa Mon Sep 17 00:00:00 2001
From: rzmk <30333942+rzmk@users.noreply.github.com>
Date: Tue, 21 Oct 2025 18:16:48 -0400
Subject: [PATCH] feat(docs): add interactive Why section on home page
---
docs/app/(home)/page.tsx | 278 +++++++++++++++++++++++++++++++++++----
1 file changed, 249 insertions(+), 29 deletions(-)
diff --git a/docs/app/(home)/page.tsx b/docs/app/(home)/page.tsx
index 0c21d60..bfb9ba6 100644
--- a/docs/app/(home)/page.tsx
+++ b/docs/app/(home)/page.tsx
@@ -1,6 +1,7 @@
/** biome-ignore-all lint/suspicious/noArrayIndexKey: Would need to look into this trivial issue */
"use client";
+import { CodeBlock } from "fumadocs-ui/components/codeblock";
import defaultMdxComponents from "fumadocs-ui/mdx";
import { cn } from "fumadocs-ui/utils/cn";
import {
@@ -8,11 +9,14 @@ import {
GitMergeIcon,
HomeIcon,
SailboatIcon,
+ TerminalIcon,
+ Trash2Icon,
ZapIcon,
} from "lucide-react";
import Image from "next/image";
import Link from "next/link";
-import { useState } from "react";
+import { type HTMLProps, type ReactNode, useState } from "react";
+import { Pre } from "@/components/codeblock";
import { buttonVariants } from "@/components/ui/button";
import CkanDevstallerDemo from "./ckan-devstaller-demo.gif";
@@ -37,6 +41,7 @@ export default function HomePage() {
>
+
@@ -48,10 +53,20 @@ export default function HomePage() {
href="https://dathere.com"
target="_blank"
className="font-medium text-blue-400"
+ rel="noopener"
>
datHere
- . Privacy Policy .
+ .{" "}
+
+ Privacy Policy
+
+ .
@@ -123,33 +138,28 @@ function Hero() {
Source Code
-
- }
- href="/docs"
- title="Quick start"
- >
- Get started with ckan-devstaller and install CKAN within minutes
-
- } href="/docs/builder" title="Builder">
- Customize your installation with an interactive web GUI
-
- }
- href="/docs/reference/installation-architecture"
- title="Installation architecture"
- >
- Learn about where files are installed after running
- ckan-devstaller
-
- }
- href="https://github.com/dathere/ckan-devstaller"
- title="Source code"
- >
- View the source code of ckan-devstaller on GitHub
-
-
+
+ } href="/docs" title="Quick start">
+ Get started with ckan-devstaller and install CKAN within minutes
+
+ } href="/docs/builder" title="Builder">
+ Customize your installation with an interactive web GUI
+
+ }
+ href="/docs/reference/installation-architecture"
+ title="Installation architecture"
+ >
+ Learn about where files are installed after running ckan-devstaller
+
+ }
+ href="https://github.com/dathere/ckan-devstaller"
+ title="Source code"
+ >
+ View the source code of ckan-devstaller on GitHub
+
+
);
@@ -199,3 +209,213 @@ function PreviewImages() {
);
}
+
+function Why() {
+ return (
+
+
+ ./ckan-devstaller
+
+ }
+ codeblockUninstall={
+
+ ./ckan-devstaller uninstall
+
+ }
+ />
+
+ );
+}
+
+export function WhyInteractive(props: {
+ codeblockInstall: ReactNode;
+ codeblockUninstall: ReactNode;
+}) {
+ const [active, setActive] = useState(0);
+ const items = [
+ [
+ ,
+ "Install CKAN within minutes",
+ ],
+ [
+ ,
+ "Customize your installation",
+ ],
+ [
+ ,
+ "Designed for developers",
+ ],
+ [
+ ,
+ "Uninstall with ease",
+ ],
+ ];
+
+ return (
+
+
+ {items.map((item, i) => (
+ {
+ if (!element || i !== active) return;
+ }}
+ type="button"
+ className={cn(
+ "transition-colors text-nowrap border border-transparent rounded-lg px-3 py-2.5 text-start text-sm text-fd-muted-foreground font-medium",
+ i === active
+ ? "text-fd-primary bg-fd-primary/10 border-fd-primary/10"
+ : "hover:text-fd-accent-foreground/80 cursor-pointer",
+ )}
+ onClick={() => {
+ setActive(i);
+ }}
+ >
+ {item[0]} {item[1]}
+
+ ))}
+
+
+
+
+ {active === 0 ? (
+
+
+
+ Install CKAN within minutes.
+
+
+ One of the primary goals of ckan-devstaller is to ease
+ installation of CKAN for development. Built with Rust for speed
+ and streamlining installation with{" "}
+
+ ckan-compose
+
+ , ckan-devstaller improves installation speeds{" "}
+ from hours/days to just minutes depending on your
+ download speed.
+
+
+
+ Get started
+
+
+ Customize your installation
+
+
+
+ ) : null}
+ {active === 1 ? (
+
+
+
+ Customize your installation with the Builder.
+
+
+ Try out the interactive web GUI for customizing your CKAN
+ installation. You can select:
+
+
+ Presets
+ CKAN version
+ Extensions
+ Features
+
+
+ Then you can copy the provided ckan-devstaller command to run your
+ selected configuration.
+
+
+
+ Try out the Builder
+
+
+
+ ) : null}
+ {active === 2 ? (
+
+
+
+ Designed for developers.
+
+
+ We've kept development use cases in mind while developing
+ ckan-devstaller, such as:
+
+
+ Trying out a new version of CKAN
+ Developing CKAN extensions and themes
+
+
+
+ View the installation architecture
+
+
+ Source code
+
+
+
+ ) : null}
+ {active === 3 ? (
+
+
+
+ Uninstall CKAN with ease.
+
+
+ After you've installed CKAN with ckan-devstaller, you can
+ uninstall CKAN with ease. This allows for quickly re-installing
+ CKAN for a different use case.
+
+ {props.codeblockUninstall}
+
+ Learn more about uninstalling
+
+
+ ) : null}
+
+
+ );
+}
+
+function WhyPanel(props: HTMLProps) {
+ return (
+
+ {props.children}
+
+ );
+}