If you run a statically generated website, I recommend append-only generation, where you keep your `dist/` (or whatever web root) stateful between builds. This guarantees you don't break URIs even if the static generator changes or the source content is removed.
You can even make an orphan branch and check out that branch into `dist/` as a worktree to keep it under version control.