first commit

This commit is contained in:
Your Name committed 2026-10-11 18:08:33 +02:00
commit 1ba45f88aa
1 file changed
+78
+78
View File
@@ -0,0 +1,78 @@
# Ink website
Marketing and download site for [Ink](../Ink), a calm, offline Markdown notes app.
Astro (static output), TypeScript, plain CSS, [Bun](https://bun.sh). No analytics, no cookies, no third-party requests.
## Run
```sh
bun install
bun run dev # http://localhost:4321
bun run build # astro check + static build into dist/
bun run preview # serve dist/
```
## Where things live
| What | Where |
| --- | --- |
| Name, version, size, checksum, download and repo URLs | `src/config.ts` (the only file to edit for a release) |
| Changelog entries | `src/content/changelog/*.md` (front matter: `version`, `date`, `title`, `prerelease`) |
| Screenshots | `src/assets/screens/`, described in `src/lib/screens.ts` |
| Theme tokens | top of `src/styles/global.css` |
| Pages | `src/pages/` |
### Releasing a new version
1. Build the app (`bun run dist` in the Ink repo) and upload the AppImage to your release page.
2. In `src/config.ts` update `version`, `releaseDate`, the platform `bytes` and `sha256` (`sha256sum Ink-*.AppImage`).
3. Add `src/content/changelog/<version>.md`. The build warns if the newest entry differs from `config.version`.
### Screenshots
Each screenshot is a name plus two theme variants, 16:10, 2400x1500:
```
src/assets/screens/editor-dark.png editor-light.png
```
A real `.png`/`.webp`/`.jpg` automatically replaces a placeholder `.svg` of the same name, and a bare
`editor.png` is used for both themes. `<Screenshot name="editor" />` handles sizes, lazy loading
and picking the image for the visitor's colour scheme.
**Regenerating them from the real app** (read only; nothing in the Ink repo is touched):
```sh
bun run screenshots # = sh scripts/capture/run.sh
```
This runs Ink headless (Electron, `--ozone-platform=headless`) against a throw-away notes folder
that `scripts/capture/seed-vault.cjs` builds in `/tmp` (about 40 notes, a board, a canvas, a few
page versions, tag colours). `scenes.cjs` drives the UI the way a user would (Ctrl+K, `/`, Ctrl+G ...)
and saves both themes straight into `src/assets/screens/`. Link-card previews are stubbed so no
network is used. Edit the seed or a scene and re-run to change a shot. Needs the Ink repo built and
installed next to this one (`INK_APP=/path/to/Ink` overrides the location; `SCENES=editor,canvas`
limits what is captured).
To add a new screenshot, add it to `src/lib/screens.ts`, add a scene, and run `bun run assets` for a
placeholder in the meantime.
## Deploy
The output is plain static files in `dist/`. Set two environment variables at build time:
- `SITE_URL`: the public origin, e.g. `https://ink.example` (used for canonical URLs, sitemap, Open Graph).
- `BASE_PATH`: only for a sub-path such as a GitHub Pages project site (`/ink-website`). Default `/`.
**Cloudflare Pages / Netlify**: build command `bun run build`, output directory `dist`, set `SITE_URL`.
**GitHub Pages**: `.github/workflows/deploy.yml` builds with Bun and publishes `dist/`.
Edit `SITE_URL` and `BASE_PATH` in it, then enable *Settings → Pages → Source: GitHub Actions*.
Add `Sitemap: <SITE_URL>/sitemap-index.xml` to `public/robots.txt` once the URL is known.
## Notes
- `public/og.png` (1200x630) is a static file; replace it if the tagline changes.
- The `typescript` dependency is pinned to 6.x because `astro check` does not support TypeScript 7 yet.
- Builds are unsigned and Windows/macOS are "coming soon" by design: see `platforms.*.available` in `config.ts`.