Point frontpage card "Latest" button at the /latest/ permalink #121

Merged
qwc merged 1 commit from feature/frontpage-card-latest-link into main 2026-06-18 13:32:39 +02:00
Owner

Follow-up to the latest-permalink work (#119/#120).

The Latest button on the home-page project cards linked to the concrete newest version (/project/{slug}/{tag}/), so clicking it landed the visitor on a version-pinned URL. Now it links to the rolling /project/{slug}/latest/ permalink — so the URL you land on (and can copy from the address bar to share) always tracks the newest version.

  • internal/templates/partials/project_card.html: the Latest button href → /project/{slug}/latest/. Still gated on LatestVersion, so it only renders when the project has at least one version (and /latest/ would resolve).
  • Test: TestFrontpageCardLinksToLatestPermalink asserts the card links to /latest/ and not the concrete tag.
  • Docs: noted in the first-project "Linking to the latest version" section.

One file of real change plus a test and a doc line. No Go logic change — LatestVersion is still computed for the button's visibility gate.

🤖 Generated with Claude Code

Follow-up to the latest-permalink work (#119/#120). The **Latest** button on the home-page project cards linked to the concrete newest version (`/project/{slug}/{tag}/`), so clicking it landed the visitor on a version-pinned URL. Now it links to the rolling **`/project/{slug}/latest/`** permalink — so the URL you land on (and can copy from the address bar to share) always tracks the newest version. - `internal/templates/partials/project_card.html`: the Latest button href → `/project/{slug}/latest/`. Still gated on `LatestVersion`, so it only renders when the project has at least one version (and `/latest/` would resolve). - Test: `TestFrontpageCardLinksToLatestPermalink` asserts the card links to `/latest/` and not the concrete tag. - Docs: noted in the first-project "Linking to the latest version" section. One file of real change plus a test and a doc line. No Go logic change — `LatestVersion` is still computed for the button's visibility gate. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Point frontpage card "Latest" button at the /latest/ permalink
All checks were successful
CI / test (pull_request) Successful in 1m9s
CI / build (pull_request) Successful in 39s
CI / docker (pull_request) Has been skipped
8f2beeb8f1
The home-page project cards' Latest button linked to the concrete newest
version (/project/{slug}/{tag}/), so a visitor landed on a version-pinned
URL. Link it to the rolling /project/{slug}/latest/ permalink instead, so
the URL someone lands on (and can copy/share) always tracks the newest
version. The button is still gated on LatestVersion, so it only appears
when the project has at least one version.

Adds a frontpage test asserting the card links to /latest/ and not the
concrete tag; notes it in the first-project docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
qwc merged commit 149693e86f into main 2026-06-18 13:32:39 +02:00
qwc deleted branch feature/frontpage-card-latest-link 2026-06-18 13:32:39 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
qwc-open/asiakirjat!121
No description provided.