diff --git a/.vitepress/config.js b/.vitepress/config.js index b8846007..296bf2d1 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -3,11 +3,27 @@ import { defineConfig } from "vitepress"; // https://vitepress.dev/reference/site-config export default defineConfig({ vite: { + // esbuild 0.28+ will not downlevel destructuring for safari14 / chrome87. + // Raise the target so docs:dev and docs:build do not need that transform. + build: { + target: "es2022", + }, + optimizeDeps: { + esbuildOptions: { + target: "es2022", + }, + }, esbuild: { supported: { destructuring: true, }, }, + // Avoid watching the C# solution / VS locks (EBUSY on .vsidx files). + server: { + watch: { + ignored: ["**/Source/**", "**/.vs/**", "**/bin/**", "**/obj/**"], + }, + }, }, title: "Libation", description: diff --git a/.vitepress/theme/custom.css b/.vitepress/theme/custom.css index 91dfca6e..e8deba58 100644 --- a/.vitepress/theme/custom.css +++ b/.vitepress/theme/custom.css @@ -9,6 +9,51 @@ "Liberation Mono", "Courier New", monospace; } +/* Donate page: primary options */ +.donate-options { + display: flex; + flex-wrap: wrap; + gap: 1rem; + margin: 1.25rem 0 0.5rem; +} + +.donate-option { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.15rem; + min-width: 11rem; + padding: 1rem 1.25rem; + border: 1px solid var(--vp-c-divider); + border-radius: 8px; + background: var(--vp-c-bg-soft); + text-decoration: none !important; + color: var(--vp-c-text-1) !important; + transition: border-color 0.15s ease, background-color 0.15s ease; +} + +.donate-option:hover { + border-color: var(--vp-c-brand-1); + background: var(--vp-c-bg-elv); +} + +.donate-option__icon { + width: 1.75rem; + height: 1.75rem; + margin-bottom: 0.35rem; +} + +.donate-option__label { + font-size: 1.1rem; + font-weight: 600; + line-height: 1.3; +} + +.donate-option__hint { + font-size: 0.85rem; + color: var(--vp-c-text-2); +} + /* Hide certain nav items on tablet devices to prevent horizontal scroll */ @media (min-width: 640px) and (max-width: 959px) { /* Target specific nav items by their position */ diff --git a/docs/development/website.md b/docs/development/website.md index 4a5d720f..9739276a 100644 --- a/docs/development/website.md +++ b/docs/development/website.md @@ -1,27 +1,47 @@ # Website & Docs -This documentation is built with [VitePress](https://vitepress.dev/) and located in the `docs` directory. For more information like [markdown syntax](https://vitepress.dev/guide/markdown#advanced-configuration) and [routing](https://vitepress.dev/guide/routing) or other features, refer [VitePress documentation](https://vitepress.dev/guide). +The [getlibation.com](https://getlibation.com) site is built with [VitePress](https://vitepress.dev/). Site content lives in this repo: the home page is `index.md` at the root, documentation pages are under `docs/`, and site config / theme files are in `.vitepress/`. -### Prerequisites +For VitePress details (markdown, routing, and more), see the [VitePress guide](https://vitepress.dev/guide). -- Node.js 18+ +## Prerequisites -### Commands +- [Node.js](https://nodejs.org/) 18 or newer + +## Run the site locally + +From the **repository root** (`Libation/`, where `package.json` is): + +### One-time setup + +Install npm dependencies (needed once after cloning, or again after dependency changes): ```bash -# Install dependencies npm install +``` -# Start local dev server (http://localhost:5173) +### Start the dev server + +```bash npm run docs:dev +``` -# Build for production (output: docs/.vitepress/dist) +Then open [http://localhost:5173](http://localhost:5173) in your browser. The server reloads when you edit markdown or theme files. + +Stop it with `Ctrl+C` in that terminal. + +### Other commands + +```bash +# Production build (output: .vitepress/dist) npm run docs:build -# Preview production build +# Preview the production build locally npm run docs:preview ``` -### Note +## Adding pages -New pages are automatically routed based on their folder structure (e.g., `docs/docs/index.md` maps to `/docs/index`). To add them to the sidebar, update the `sidebar` configuration in `.vitepress/config.js`. +New markdown files are routed from their path automatically (for example `docs/getting-started.md` -> `/docs/getting-started`, or `donate.md` at the repo root -> `/donate`). + +To show a page in the sidebar or top nav, add it in `.vitepress/config.js`. A page can exist and be reachable by URL without being linked in navigation. diff --git a/donate.md b/donate.md new file mode 100644 index 00000000..6afd0844 --- /dev/null +++ b/donate.md @@ -0,0 +1,26 @@ +# Donate + +Libation is free and always will be. If you'd like to tip anyway: thank you. It means a lot. + + + +::: info Skip purchase protection +If PayPal or Venmo offers "purchase protection" / goods & services, please skip it. That option just gives part of your tip to them. +::: + +- **[Amazon gift card](https://www.amazon.com/dp/B07PCMWTSG)** - send it to the email on my [GitHub profile](https://github.com/rmcrackan) (you must be logged in to GitHub to see it) +- If none of these are you're cup of tea, please donate to a charity such as the [No Limits Foundation](https://www.nolimitsfoundation.org/ways-to-give). I don't get any personal benefit from this, but they're a beautiful organization I've been involved with for years