From 7697dcf3c34b7fd2cb33228572ee552a412f7d8e Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Tue, 26 May 2026 20:59:37 +0100 Subject: [PATCH] site: address PR review on header & version fetch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot review on the cache commit raised three points: 1. inline.js had a hard-coded `https://api.github.com/repos/umputun/remark42` while the templates use `site.githubUrl`. Rename inline.js → inline.njk so nunjucks evaluates it, add `githubApiUrl` to site.json, and template the fetch URL from it. One place to update if the repo ever moves. 2. header.njk aria-label said "Remark42's GitHub Repository" but the link target is `/releases`. Change to "{{ site.name }} releases on GitHub" so screen readers describe the actual destination. 3. console.warn on fetch failure (kept after umputun's prior review noted the trade-off): addressed in the PR description, no code change. --- site/src/data/site.json | 1 + site/src/includes/components/head.njk | 2 +- site/src/includes/components/header.njk | 2 +- site/src/includes/{inline.js => inline.njk} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename site/src/includes/{inline.js => inline.njk} (100%) diff --git a/site/src/data/site.json b/site/src/data/site.json index d76cd0ed..8e45c6ba 100644 --- a/site/src/data/site.json +++ b/site/src/data/site.json @@ -4,6 +4,7 @@ "description": "Remark42 is a self-hosted, lightweight, and simple (yet functional) comment engine, which doesn't spy on users. It can be embedded into blogs, articles or any other place where readers add comments.", "url": "https://remark42.com", "githubUrl": "https://github.com/umputun/remark42", + "githubApiUrl": "https://api.github.com/repos/umputun/remark42", "githubBranch": "master", "remark42Host": "https://demo.remark42.com" } diff --git a/site/src/includes/components/head.njk b/site/src/includes/components/head.njk index 62303099..ce224e47 100644 --- a/site/src/includes/components/head.njk +++ b/site/src/includes/components/head.njk @@ -12,7 +12,7 @@ {% endif %} - + {% set js %} {% include "script.js" %} {% endset %} diff --git a/site/src/includes/components/header.njk b/site/src/includes/components/header.njk index a51d88aa..47b3f532 100644 --- a/site/src/includes/components/header.njk +++ b/site/src/includes/components/header.njk @@ -8,7 +8,7 @@ Docs
- + diff --git a/site/src/includes/inline.js b/site/src/includes/inline.njk similarity index 100% rename from site/src/includes/inline.js rename to site/src/includes/inline.njk