From 4238af304e70cdff1d14e356f29eda6dff866dbc Mon Sep 17 00:00:00 2001 From: randogoth Date: Tue, 6 Oct 2026 18:14:23 +0300 Subject: [PATCH] fix: key threads on the canonical URL, and space the header box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SITEURL is empty in this config, so rendering the thread key into the template produced a relative path. Threads would have been keyed on /pastfetch.html and orphaned the moment the site moved or gained a prefix. The page computes location.origin + location.pathname instead, which is unambiguous and needs no configuration. The fill in the REPLIES header ran straight into the count, which read as '────0 messages'. Every other box on the board keeps a space there. --- randogoth.com/bbs/static/bbs.js | 8 ++++++-- randogoth.com/bbs/templates/article.html | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/randogoth.com/bbs/static/bbs.js b/randogoth.com/bbs/static/bbs.js index f6a8bb0..afcfec7 100644 --- a/randogoth.com/bbs/static/bbs.js +++ b/randogoth.com/bbs/static/bbs.js @@ -255,7 +255,11 @@ var BBS = {}; function init() { var box = document.getElementById('replies'); if (!box) return; - var host = box.dataset.host, site = box.dataset.site, url = box.dataset.url; + var host = box.dataset.host, site = box.dataset.site; + // The thread key is the canonical page URL, taken from the page rather than + // rendered in: SITEURL is empty in this config, which would key every + // thread on a relative path and break the moment the site moved. + var url = location.origin + location.pathname; var token = null; function esc(s) { @@ -296,7 +300,7 @@ var BBS = {}; var title = ' REPLIES '; var tail = count === 1 ? '1 message ' : count + ' messages '; var left = '┌─' + title; - var right = tail + '─┐'; + var right = ' ' + tail + '─┐'; return '
' + esc(left) + fill(W - left.length - right.length) + esc(right) + '
'; } diff --git a/randogoth.com/bbs/templates/article.html b/randogoth.com/bbs/templates/article.html index 7324189..fb44a9c 100644 --- a/randogoth.com/bbs/templates/article.html +++ b/randogoth.com/bbs/templates/article.html @@ -26,7 +26,6 @@ JS the section simply is not there, which is honest, and the capsule never sees it at all since Gemini has no way to render it. -#} {%- if COMMENTS_HOST %} -
+
{%- endif %} {% endblock %}