diff options
| author | user <user@clank> | 2026-09-02 15:21:52 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-02 15:21:52 +0200 |
| commit | 670add69317750ebc62f92662ea55d2e42439334 (patch) | |
| tree | cb875e14bd445f2fa32b7008fbb4a72884c4aedc /web | |
| parent | web: contributing section, shorter (diff) | |
| download | slosh-670add69317750ebc62f92662ea55d2e42439334.tar.gz slosh-670add69317750ebc62f92662ea55d2e42439334.tar.xz slosh-670add69317750ebc62f92662ea55d2e42439334.zip | |
web: the released version in the hero, linking to the release
Stamped by build-site from ./VERSION, which the release invariant
keeps equal to the newest tag -- so the page cannot advertise a
version that was never cut, and nothing is bumped by hand.
Diffstat (limited to 'web')
| -rwxr-xr-x | web/build-site | 8 | ||||
| -rw-r--r-- | web/index.html | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/web/build-site b/web/build-site index 2437cb3..06e6451 100755 --- a/web/build-site +++ b/web/build-site @@ -30,8 +30,12 @@ publish() { mv "$out" "$www" } -# The front page. Its recordings are below; there is no video. -cp "$here/index.html" "$here/site.css" "$out/" +# The front page. Its recordings are below; there is no video. The released +# version is stamped in from ./VERSION: the file the release invariant keeps +# equal to the newest tag, so the page cannot claim a version that was never +# cut, and a snapshot without git still knows the answer. +sed "s/@VERSION@/v$(cat "$root/VERSION")/g" "$here/index.html" > "$out/index.html" +cp "$here/site.css" "$out/" # The docs, rendered by the same generator `make docs` uses. python3 "$root/contrib/gen-docs" "$out/docs" diff --git a/web/index.html b/web/index.html index ca40707..e29f726 100644 --- a/web/index.html +++ b/web/index.html @@ -25,6 +25,9 @@ <a class="btn" href="#install">install</a> <a class="btn ghost" href="#try">try it</a> <a class="btn ghost" href="docs/">browse docs</a> + <!-- @VERSION@ is stamped by web/build-site from ./VERSION, which the + release invariant keeps equal to the newest tag --> + <a class="btn ghost" href="https://github.com/sl0p-foo/slosh/releases/latest">@VERSION@</a> </p> </header> |
