diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f73183e --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# GitHub Sponsors is pending for Coding Moves. Until it is approved, +# the Sponsor button points to the project's professional support page. +custom: + - "https://coding-moves.github.io/diskern/support" diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index e260f00..1cf143f 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -61,6 +61,8 @@ jobs: - run: npm run build working-directory: site + env: + VITE_WISE_PAYMENT_URL: ${{ vars.VITE_WISE_PAYMENT_URL }} # GitHub Pages has no server-side routing: a direct visit to # /diskern/docs would 404 before React Router ever loads. Serving diff --git a/site/.env.example b/site/.env.example new file mode 100644 index 0000000..449c667 --- /dev/null +++ b/site/.env.example @@ -0,0 +1,3 @@ +# Public Wise receiving/payment link only. This value is visible in the built site. +# Do not enter bank account details, passwords, or API tokens. +VITE_WISE_PAYMENT_URL= diff --git a/site/.gitignore b/site/.gitignore index b54d88d..1521bf7 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -25,3 +25,8 @@ public/latest-release.json *.njsproj *.sln *.sw? + +# Local sponsorship configuration (commit only the empty example). +.env +.env.* +!.env.example diff --git a/site/README.md b/site/README.md index 43bf6d5..a1a961e 100644 --- a/site/README.md +++ b/site/README.md @@ -32,3 +32,33 @@ The Vite `base` in `vite.config.js` is set to `/diskern/` to match this repo's GitHub Pages URL (`coding-moves.github.io/diskern/` or your configured custom domain). If the repo is ever renamed, update `base` to match. + +## Configure Wise sponsorship + +The Support page uses a public Wise receiving/payment link. Bank details are +managed in Wise, not in the desktop app or this repository. +Supporters follow the link directly; the site does not require an invoice +request or a conversation with the maintainer before payment when configured. + +For local development, copy `.env.example` to `.env.local` in this directory. +Set this value to the HTTPS payment link copied from your Wise account: + +```dotenv +VITE_WISE_PAYMENT_URL= +``` + +Paste the link after the equals sign, then restart `npm run dev`. +The local file is ignored by Git. Only HTTPS links on `wise.com` are accepted; +a missing or invalid link shows “Discuss sponsorship” instead. + +For the live site, open repository **Settings → Secrets and variables → +Actions → Variables → New repository variable**. Name it +`VITE_WISE_PAYMENT_URL` and paste the same public link as its value. +After this PR is merged, run **Actions → Deploy site to GitHub Pages → +Run workflow** on `main` to publish the setting. Updating a variable alone +does not rebuild the site. + +Vite embeds this value in public JavaScript. Gitignore and GitHub secrets do +not make browser-visible values private. Do not put account numbers, passwords, +or Wise API tokens here. The GitHub Sponsor button continues to point to the +Support page through `.github/FUNDING.yml`. diff --git a/site/src/App.jsx b/site/src/App.jsx index f23ffdc..a3f4ae0 100644 --- a/site/src/App.jsx +++ b/site/src/App.jsx @@ -2,6 +2,7 @@ import { Routes, Route } from 'react-router-dom' import Layout from './components/Layout.jsx' import Home from './pages/Home.jsx' import NotFound from './pages/NotFound.jsx' +import Support from './pages/Support.jsx' // All routes share (nav + footer). To add a new page later — // e.g. /docs or /changelog — create src/pages/Docs.jsx and add @@ -11,6 +12,7 @@ export default function App() { }> } /> + } /> } /> diff --git a/site/src/components/Footer.jsx b/site/src/components/Footer.jsx index d87866c..6eb6239 100644 --- a/site/src/components/Footer.jsx +++ b/site/src/components/Footer.jsx @@ -1,3 +1,5 @@ +import { Link } from 'react-router-dom' + export default function Footer() { return ( ) diff --git a/site/src/components/NavBar.jsx b/site/src/components/NavBar.jsx index 269707c..61fc303 100644 --- a/site/src/components/NavBar.jsx +++ b/site/src/components/NavBar.jsx @@ -19,6 +19,10 @@ export default function NavBar() { Diskern + +