diff --git a/.github/workflows/run-ckan-only-install.yml b/.github/workflows/run-ckan-only-install.yml new file mode 100644 index 0000000..68ea266 --- /dev/null +++ b/.github/workflows/run-ckan-only-install.yml @@ -0,0 +1,26 @@ +name: Verify ckan-devstaller runs CKAN-only install successfully +on: + push: + branches: + - main + paths-ignore: + - 'docs/**' + - 'README.md' + workflow_dispatch: +jobs: + ckanonlyinstall: + name: Run ckan-devstaller with a CKAN-only install + runs-on: ubuntu-22.04 + permissions: + # For the git-auto-commit-action + contents: write + steps: + - uses: actions/checkout@v4 + - name: Install Rust stable toolchain + uses: dtolnay/rust-toolchain@stable + - name: Cache cargo deps and target folder + uses: Swatinem/rust-cache@v2 + with: + workspaces: ". -> target" + - name: Run ckan-devstaller + run: cargo run --release --verbose -- --ckan-version 2.11.4 --skip-interactive --skip-run diff --git a/Cargo.lock b/Cargo.lock index b9355a9..6bd3e74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + [[package]] name = "anstream" version = "0.6.20" @@ -64,6 +79,27 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bitflags" version = "1.3.2" @@ -90,10 +126,11 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "ckan-devstaller" -version = "0.1.0" +version = "0.3.0" dependencies = [ "anyhow", "clap", + "human-panic", "inquire", "owo-colors", "rust-ini", @@ -163,7 +200,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom", + "getrandom 0.2.16", "once_cell", "tiny-keccak", ] @@ -199,6 +236,15 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "deranged" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" +dependencies = [ + "powerfmt", +] + [[package]] name = "dlv-list" version = "0.5.2" @@ -214,6 +260,12 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + [[package]] name = "errno" version = "0.3.13" @@ -261,15 +313,39 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.3+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" + [[package]] name = "heck" version = "0.5.0" @@ -282,6 +358,32 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +[[package]] +name = "human-panic" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac63a746b187e95d51fe16850eb04d1cfef203f6af98e6c405a6f262ad3df00a" +dependencies = [ + "anstream", + "anstyle", + "backtrace", + "os_info", + "serde", + "serde_derive", + "toml", + "uuid", +] + +[[package]] +name = "indexmap" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" +dependencies = [ + "equivalent", + "hashbrown 0.15.5", +] + [[package]] name = "inquire" version = "0.7.5" @@ -362,6 +464,15 @@ version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.8.11" @@ -370,7 +481,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -383,6 +494,21 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.21.3" @@ -402,7 +528,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown", + "hashbrown 0.14.5", +] + +[[package]] +name = "os_info" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" +dependencies = [ + "log", + "plist", + "serde", + "windows-sys 0.52.0", ] [[package]] @@ -438,6 +576,25 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "plist" +version = "1.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af6b589e163c5a788fab00ce0c0366f6efbb9959c2f9874b224936af7fce7e1" +dependencies = [ + "base64", + "indexmap", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro2" version = "1.0.97" @@ -447,6 +604,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quick-xml" +version = "0.38.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.40" @@ -456,6 +622,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "redox_syscall" version = "0.5.17" @@ -475,6 +647,12 @@ dependencies = [ "ordered-multimap", ] +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + [[package]] name = "rustix" version = "1.0.8" @@ -532,6 +710,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +dependencies = [ + "serde", +] + [[package]] name = "signal-hook" version = "0.3.18" @@ -613,6 +800,36 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "time" +version = "0.3.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -622,6 +839,33 @@ dependencies = [ "crunchy", ] +[[package]] +name = "toml" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_writer", +] + +[[package]] +name = "toml_datetime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_writer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" + [[package]] name = "unicode-ident" version = "1.0.18" @@ -646,12 +890,30 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "getrandom 0.3.3", +] + [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasi" +version = "0.14.3+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "winapi" version = "0.3.9" @@ -689,6 +951,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.59.0" @@ -893,6 +1164,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "wit-bindgen" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" + [[package]] name = "xshell" version = "0.2.7" diff --git a/Cargo.toml b/Cargo.toml index b16f6de..732c927 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "ckan-devstaller" -version = "0.1.0" +version = "0.3.0" edition = "2024" [dependencies] anyhow = "1.0.99" clap = { version = "4.5.45", features = ["derive"] } +human-panic = "2.0.3" inquire = "0.7.5" owo-colors = { version = "4.2.2", features = ["supports-colors"] } rust-ini = "0.21.2" diff --git a/README.md b/README.md index 952ab59..762f607 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,41 @@ # ckan-devstaller -`ckan-devstaller` attempts to install CKAN 2.11.3 from source using [ckan-compose](https://github.com/tino097/ckan-compose), intended for development use in a new Ubuntu 22.04 instance. The following are also installed and enabled by default: +{1329F0BA-A29F-4BF8-BB6B-E3BA84FDAFCC} -- [DataStore extension](https://docs.ckan.org/en/2.11/maintaining/datastore.html) -- [ckanext-scheming extension](https://github.com/ckan/ckanext-scheming) -- [DataPusher+ extension](https://github.com/dathere/datapusher-plus) -- [DRUF mode](https://github.com/dathere/datapusher-plus?tab=readme-ov-file#druf-dataset-resource-upload-first-workflow) -The [`datatablesview-plus` extension](https://github.com/dathere/ckanext-datatables-plus) is planned to be included in a future release. +`ckan-devstaller` attempts to install a [CKAN](https://ckan.org) instance using [ckan-compose](https://github.com/tino097/ckan-compose/tree/ckan-devstaller) for development usage in a new Ubuntu 22.04 instance. -> [!NOTE] -> We plan on including customizability for enabling/disabling features in a future release. +You may find `ckan-devstaller` useful for: -## Quick start +- Exploring CKAN for the first time without spending hours on installation steps +- Developing/Testing CKAN extensions and fixing bugs +- Trying a new CKAN version to test an upgrade from a legacy version -> [!CAUTION] -> Make sure `ckan-devstaller` is run in a **new** Ubuntu 22.04 instance. Do NOT run `ckan-devstaller` in an existing instance that is important for your usage. +`ckan-devstaller` was made to help speed up the installation time for CKAN and various extensions/features to boost development productivity. -> [!NOTE] -> The `/etc/ckan/default/ckan.ini` config file will have its comments removed for now. There are plans to fix this in a future release of `ckan-devstaller`. +**Get started at [ckan-devstaller.dathere.com](https://ckan-devstaller.dathere.com).** -Paste this into your new Ubuntu 22.04 instance's terminal: +## Learn more about developing with CKAN -```bash -wget -O - https://github.com/dathere/ckan-devstaller/releases/download/0.1.0/install.bash | bash -``` +You may find the following guides useful while developing with CKAN: -{8479CBE1-788E-48B3-AE9C-F3A51724520C} +- [CKAN Hardware Requirements](https://github.com/ckan/ckan/wiki/Hardware-Requirements) - Learn what you need before installing CKAN +- [CKAN Sysadmin guide](https://docs.ckan.org/en/latest/sysadmin-guide.html) - Useful for CKAN instance administrators/sysadmins +- [CKAN Theming guide](https://docs.ckan.org/en/latest/theming/index.html) - Explore how to set up custom themes for your CKAN instance +- [CKAN Extending guide](https://docs.ckan.org/en/latest/extensions/index.html) - Develop CKAN extensions that can enhance your CKAN instance's functionality and add custom features -## Demo (sped up) +## What next? +- [Customize your config file](https://docs.ckan.org/en/latest/extensions/index.html) +- [Create test data](https://docs.ckan.org/en/latest/maintaining/getting-started.html#creating-test-data) +- [Visit ckan.org](https://ckan.org) +- [Interact with your CKAN API at ckanaction.dathere.com](https://ckanaction.dathere.com) + +## `ckan-devstaller` demos + +### Interactive customizable installation + +![ckan-devstaller-interactive-mode-demo](https://github.com/user-attachments/assets/cc12471c-5b20-4571-85d6-8a4351931419) + +### Installation (sped up) ![ckan-devstaller-demo](https://github.com/user-attachments/assets/9fc388ab-e044-4453-ae49-7d7f31065fe3) diff --git a/docs/.env.example b/docs/.env.example new file mode 100644 index 0000000..1accae9 --- /dev/null +++ b/docs/.env.example @@ -0,0 +1,2 @@ +NEXT_TELEMETRY_DISABLED=1 +TURBO_TELEMETRY_DISABLED=1 diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..3566783 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,30 @@ +# deps +/node_modules + +# generated content +.contentlayer +.content-collections +.source + +# test & build +/coverage +/.next/ +/out/ +/build +*.tsbuildinfo + +# misc +.DS_Store +*.pem +/.pnp +.pnp.js +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# others +.env* +.env*.local +!.env.example +.vercel +next-env.d.ts \ No newline at end of file diff --git a/docs/.nvmrc b/docs/.nvmrc new file mode 100644 index 0000000..b009dfb --- /dev/null +++ b/docs/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..5144394 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,39 @@ +# ckan-devstaller docs website (ckan-devstaller.dathere.com) + +![Docs landing page example](./public/docs-home-example.png) + +This directory includes a Next.js project built with [Fumadocs](https://github.com/fuma-nama/fumadocs) for documentation of ckan-devstaller. The documentation can be viewed at [ckan-devstaller.dathere.com](https://ckan-devstaller.dathere.com). + +We attempt to follow the [Divio documentation system](https://docs.divio.com/documentation-system/) which primarily includes: + +- Tutorials +- How-to guides +- Explanation +- Reference + +## Development + +Run development server: + +```bash +bun dev +``` + +Open http://localhost:3000 with your browser to see the result. + +## Explore + +In the project, you can see: + +- `lib/source.ts`: Code for content source adapter, `loader()` provides the interface to access your content. +- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep. + +| Route | Description | +| ------------------------- | ------------------------------------------------------ | +| `app/(home)` | The route group for your landing page and other pages. | +| `app/docs` | The documentation layout and pages. | +| `app/api/search/route.ts` | The Route Handler for search. | + +## Linting + +We use [Biome](https://biomejs.dev) for linting. We recommend you install the [biome-vscode extension](https://github.com/biomejs/biome-vscode) if you are using [VSCodium](https://vscodium.com/) or VSCode for developing the docs. diff --git a/docs/app/(home)/ckan-devstaller-demo.gif b/docs/app/(home)/ckan-devstaller-demo.gif new file mode 100644 index 0000000..dda1cf9 Binary files /dev/null and b/docs/app/(home)/ckan-devstaller-demo.gif differ diff --git a/docs/app/(home)/layout.tsx b/docs/app/(home)/layout.tsx new file mode 100644 index 0000000..c16b056 --- /dev/null +++ b/docs/app/(home)/layout.tsx @@ -0,0 +1,6 @@ +import { HomeLayout } from "fumadocs-ui/layouts/home"; +import { baseOptions } from "@/lib/layout.shared"; + +export default function Layout({ children }: LayoutProps<"/">) { + return {children}; +} diff --git a/docs/app/(home)/page.tsx b/docs/app/(home)/page.tsx new file mode 100644 index 0000000..72a91c6 --- /dev/null +++ b/docs/app/(home)/page.tsx @@ -0,0 +1,415 @@ +/** 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 { + BlocksIcon, + GitMergeIcon, + HomeIcon, + SailboatIcon, + TerminalIcon, + Trash2Icon, + ZapIcon, +} from "lucide-react"; +import Image from "next/image"; +import Link from "next/link"; +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"; + +export default function HomePage() { + const gridColor = + "color-mix(in oklab, var(--color-fd-primary) 10%, transparent)"; + const { Card, Cards } = defaultMdxComponents; + return ( + <> +
+
+
+
+ + +
+
+
+ +
+ + ); +} + +function Hero() { + const { Card, Cards } = defaultMdxComponents; + return ( +
+
+
+

ckan-devstaller

+

+ + ckan-devstaller{" "} + + +
+ Launch CKAN dev instances within minutes. +

+

+ ckan-devstaller is a command-line tool to automate installing CKAN for + development using ckan-compose on a new Ubuntu 22.04 instance. +

+

+ Provided by{" "} + + datHere + + . +

+
+ + Get Started + + + Source Code + +
+ + } href="/docs/builder" 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 + + + +
+ ); +} + +function PreviewImages() { + const [active, setActive] = useState(0); + const previews = [ + { + image: CkanDevstallerDemo, + name: "Demo", + }, + ]; + + return ( +
+
+ {/*
*/} + {/* {previews.map((item, i) => ( + + ))} */} +
+ {previews.map((item, i) => ( + preview + ))} +
+ ); +} + +function Why() { + return ( +
+ +
./ckan-devstaller
+ + } + codeblockUninstall={ + +
./ckan-devstaller uninstall
+
+ } + /> +
+ ); +} + +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) => ( + + ))} +
+ + +
+ {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 + +
+
+ ) : 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} +
+ ); +} diff --git a/docs/app/api/search/route.ts b/docs/app/api/search/route.ts new file mode 100644 index 0000000..ec6bc8d --- /dev/null +++ b/docs/app/api/search/route.ts @@ -0,0 +1,7 @@ +import { createFromSource } from "fumadocs-core/search/server"; +import { source } from "@/lib/source"; + +export const { GET } = createFromSource(source, { + // https://docs.orama.com/docs/orama-js/supported-languages + language: "english", +}); diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx new file mode 100644 index 0000000..9a9b214 --- /dev/null +++ b/docs/app/docs/[[...slug]]/page.tsx @@ -0,0 +1,54 @@ +import { createRelativeLink } from "fumadocs-ui/mdx"; +import { + DocsBody, + DocsDescription, + DocsPage, + DocsTitle, +} from "fumadocs-ui/page"; +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { getPageImage, source } from "@/lib/source"; +import { getMDXComponents } from "@/mdx-components"; + +export default async function Page(props: PageProps<"/docs/[[...slug]]">) { + const params = await props.params; + const page = source.getPage(params.slug); + if (!page) notFound(); + + const MDX = page.data.body; + + return ( + + {page.data.title} + {page.data.description} + + + + + ); +} + +export async function generateStaticParams() { + return source.generateParams(); +} + +export async function generateMetadata( + props: PageProps<"/docs/[[...slug]]">, +): Promise { + const params = await props.params; + const page = source.getPage(params.slug); + if (!page) notFound(); + + return { + title: page.data.title, + description: page.data.description, + openGraph: { + images: getPageImage(page).url, + }, + }; +} diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsx new file mode 100644 index 0000000..2d250d0 --- /dev/null +++ b/docs/app/docs/layout.tsx @@ -0,0 +1,11 @@ +import { DocsLayout } from "fumadocs-ui/layouts/docs"; +import { baseOptions } from "@/lib/layout.shared"; +import { source } from "@/lib/source"; + +export default function Layout({ children }: LayoutProps<"/docs">) { + return ( + + {children} + + ); +} diff --git a/docs/app/favicon.ico b/docs/app/favicon.ico new file mode 100644 index 0000000..e92b746 Binary files /dev/null and b/docs/app/favicon.ico differ diff --git a/docs/app/global.css b/docs/app/global.css new file mode 100644 index 0000000..b6836ec --- /dev/null +++ b/docs/app/global.css @@ -0,0 +1,5 @@ +@import "tailwindcss"; +@import "fumadocs-ui/css/neutral.css"; +@import "fumadocs-ui/css/ocean.css"; +@import "fumadocs-ui/css/preset.css"; +@import "tw-animate-css"; \ No newline at end of file diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx new file mode 100644 index 0000000..9d8e16f --- /dev/null +++ b/docs/app/layout.tsx @@ -0,0 +1,26 @@ +import "@/app/global.css"; +import { RootProvider } from "fumadocs-ui/provider"; +import localFont from "next/font/local"; +import Script from "next/script"; +import { Toaster } from "@/components/ui/sonner"; + +const inter = localFont({ src: "../lib/inter.ttf" }); + +export default function Layout({ children }: LayoutProps<"/">) { + return ( + + + {children} +