diff --git a/README.md b/README.md index 9e2fe6b..22c974a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ bun run preview # serve dist/ | Theme tokens | top of `src/styles/global.css` | | Pages | `src/pages/` | +### Direct downloads + +Every download button links straight to the file (`platforms.linux.url` in `src/config.ts`), with no +intermediate page. Only visitors on Windows, macOS or a phone are sent to `/download/`, because the +Linux AppImage is no use to them yet. Point `url` at any direct file URL. By default it is the GitHub +Releases asset, which is a plain download link. Don't host the 157 MB file with the site itself on +GitHub Pages (100 MB per-file limit) or Cloudflare Pages (25 MB); use Releases, R2/S3 or a CDN. + ### Releasing a new version 1. Build the app (`bun run dist` in the Ink repo) and upload the AppImage to your release page. diff --git a/src/components/DownloadButton.astro b/src/components/DownloadButton.astro index dd23eba..52bb5c2 100644 --- a/src/components/DownloadButton.astro +++ b/src/components/DownloadButton.astro @@ -1,17 +1,21 @@ --- +// A direct download: the href is the file itself, in the HTML, so it works without JS and never +// bounces through another page. Only visitors on Windows, macOS or a phone (detected in +// scripts/site.ts) are sent to /download/ instead, because the Linux AppImage is no use to them yet. import { config, formatSize } from '../config'; import { href } from '../lib/url'; interface Props { variant?: 'primary' | 'default'; note?: boolean; center?: boolean } const { variant = 'primary', note = true, center = false } = Astro.props; const linux = config.platforms.linux; +const meta = `v${config.version} · ${linux.format} · ${formatSize(linux.bytes)}`; --- -
Linux AppImage available · Windows & macOS coming soon
} + {note &&{meta} · Windows & macOS coming soon
}