From 3727d60786600cb40634f9fceddcf45fa57a7fa1 Mon Sep 17 00:00:00 2001 From: rzmk <30333942+rzmk@users.noreply.github.com> Date: Sun, 12 Oct 2025 00:42:09 -0400 Subject: [PATCH] feat(docs): add sidebar link icons, start info page, continue Builder --- docs/components/builder.tsx | 68 +++++++++++++++---- docs/content/docs/builder.mdx | 1 + docs/content/docs/index.mdx | 1 + docs/content/docs/meta.json | 3 + docs/content/docs/what-is-ckan-devstaller.mdx | 19 ++++++ docs/lib/source.ts | 6 ++ 6 files changed, 83 insertions(+), 15 deletions(-) create mode 100644 docs/content/docs/meta.json create mode 100644 docs/content/docs/what-is-ckan-devstaller.mdx diff --git a/docs/components/builder.tsx b/docs/components/builder.tsx index 8b99ce8..32cca5d 100644 --- a/docs/components/builder.tsx +++ b/docs/components/builder.tsx @@ -1,3 +1,5 @@ +"use client"; + import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock"; import defaultMdxComponents from "fumadocs-ui/mdx"; import { @@ -6,19 +8,47 @@ import { SailboatIcon, TerminalSquareIcon, } from "lucide-react"; +import { useState } from "react"; + +type Config = { + preset: string | undefined; + ckanVersion: string; + extensions: string[]; +}; export default function Builder() { const { Card, Cards } = defaultMdxComponents; + const [command, setCommand] = useState("./ckan-devstaller"); + const [config, setConfig] = useState({ + preset: undefined, + ckanVersion: "2.11.3", + extensions: [], + }); + return (
-
+

ckan-devstaller command

-
-              ./ckan-devstaller
-            
+
{command}
+

Selected configuration

+
+ CKAN version: 2.11.3 +
+
+ Extensions: +
    +
  • DataStore
  • +
  • ckanext-scheming
  • +
  • DataPusher+
  • +
+ Extra features: +
    +
  • Enable SSH
  • +
+
@@ -35,10 +65,7 @@ export default function Builder() { } title="CKAN and the DataStore extension"> Installs CKAN and the DataStore extension. - } - title="CKAN, DataStore, ckanext-scheming, and DataPusher+ extensions" - > + } title="datHere Default"> Installs CKAN, the DataStore extension, the ckanext-scheming extension, and the DataPusher+ extension. @@ -47,13 +74,14 @@ export default function Builder() { } title="2.11.3"> } title="2.10.8"> - } title="Other"> - -

SSH capability

- - } title="Enable SSH"> - Installs openssh-server and net-tools. - + } + title="Install a different version" + > + } + title="Clone from remote Git repository" + >

CKAN extensions

@@ -62,6 +90,16 @@ export default function Builder() { } title="DataStore"> } title="DataPusher+"> } title="ckanext-spatial"> + } title="Custom extension"> + +

Extra features

+ + } title="Enable SSH"> + Installs openssh-server and net-tools. + + } title="Run a Bash script"> + Run a Bash script before or after any step during the installation. +
diff --git a/docs/content/docs/builder.mdx b/docs/content/docs/builder.mdx index e0704a0..565a7b9 100644 --- a/docs/content/docs/builder.mdx +++ b/docs/content/docs/builder.mdx @@ -1,6 +1,7 @@ --- title: Builder description: Customize your CKAN installation before running ckan-devstaller. +icon: Blocks --- import Builder from "@/components/builder"; diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx index f0abbcd..9c3b456 100644 --- a/docs/content/docs/index.mdx +++ b/docs/content/docs/index.mdx @@ -1,6 +1,7 @@ --- title: Quick Start description: Get started with ckan-devstaller and install CKAN within minutes. +icon: Zap --- ckan-devstaller attempts to install a CKAN instance from source along with [ckan-compose](https://github.com/tino097/ckan-compose) and other optional features, intended for development use in a new Ubuntu 22.04 instance. diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.json new file mode 100644 index 0000000..ead60d0 --- /dev/null +++ b/docs/content/docs/meta.json @@ -0,0 +1,3 @@ +{ + "pages": ["---Introduction---", "index", "what-is-ckan-devstaller", "builder", "---Further reading---", "tutorials", "reference"] +} \ No newline at end of file diff --git a/docs/content/docs/what-is-ckan-devstaller.mdx b/docs/content/docs/what-is-ckan-devstaller.mdx new file mode 100644 index 0000000..8cb135b --- /dev/null +++ b/docs/content/docs/what-is-ckan-devstaller.mdx @@ -0,0 +1,19 @@ +--- +title: What is ckan-devstaller? +description: Learn about why ckan-devstaller was built and how it may help you. +icon: CircleQuestionMark +--- + +TODO: Improve this page. + +## Introduction + +Description + +Cards + +## Who is ckan-devstaller for + +## How can I use ckan-devstaller + +## Learn more diff --git a/docs/lib/source.ts b/docs/lib/source.ts index 114e07a..1068bc6 100644 --- a/docs/lib/source.ts +++ b/docs/lib/source.ts @@ -1,10 +1,16 @@ import { type InferPageType, loader } from "fumadocs-core/source"; +import { icons } from "lucide-react"; +import { createElement } from "react"; import { docs } from "@/.source"; // See https://fumadocs.vercel.app/docs/headless/source-api for more info export const source = loader({ baseUrl: "/docs", source: docs.toFumadocsSource(), + icon(icon) { + if (!icon) return; + if (icon in icons) return createElement(icons[icon as keyof typeof icons]); + }, }); export function getPageImage(page: InferPageType) {