site: address PR review on header & version fetch
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.
This commit is contained in:
@@ -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.",
|
"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",
|
"url": "https://remark42.com",
|
||||||
"githubUrl": "https://github.com/umputun/remark42",
|
"githubUrl": "https://github.com/umputun/remark42",
|
||||||
|
"githubApiUrl": "https://api.github.com/repos/umputun/remark42",
|
||||||
"githubBranch": "master",
|
"githubBranch": "master",
|
||||||
"remark42Host": "https://demo.remark42.com"
|
"remark42Host": "https://demo.remark42.com"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<meta name="description" content="{{ metaDescription or renderData.metaDescription or site.description }}">
|
<meta name="description" content="{{ metaDescription or renderData.metaDescription or site.description }}">
|
||||||
<link rel="stylesheet" href="/style.css?v={% version %}"/>
|
<link rel="stylesheet" href="/style.css?v={% version %}"/>
|
||||||
<script>{% include "inline.js" %}</script>
|
<script>{% include "inline.njk" %}</script>
|
||||||
{% set js %}
|
{% set js %}
|
||||||
{% include "script.js" %}
|
{% include "script.js" %}
|
||||||
{% endset %}
|
{% endset %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<a class="inline-block leading-5 font-medium border-b dark:border-gray-600 transition hover:text-brand-600 dark:hover:text-brand-300 hover:border-brand-300 dark:hover:border-brand-500" href="/docs/getting-started/installation/">Docs</a>
|
<a class="inline-block leading-5 font-medium border-b dark:border-gray-600 transition hover:text-brand-600 dark:hover:text-brand-300 hover:border-brand-300 dark:hover:border-brand-500" href="/docs/getting-started/installation/">Docs</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="order-2 md:order-3 flex space-x-2 ml-auto py-1 px-4">
|
<div class="order-2 md:order-3 flex space-x-2 ml-auto py-1 px-4">
|
||||||
<a class="hover:text-gray-800 dark:hover:text-gray-300 flex items-center" aria-label="Remark42's GitHub Repository" rel="noopener noreferrer" href="{{ site.githubUrl}}/releases" target="_blank">
|
<a class="hover:text-gray-800 dark:hover:text-gray-300 flex items-center" aria-label="{{ site.name }} releases on GitHub" rel="noopener noreferrer" href="{{ site.githubUrl}}/releases" target="_blank">
|
||||||
<span class="mr-2" data-remark42-version hidden></span>
|
<span class="mr-2" data-remark42-version hidden></span>
|
||||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none">
|
<svg width="28" height="28" viewBox="0 0 24 24" fill="none">
|
||||||
<path fill="currentColor" d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path>
|
<path fill="currentColor" d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path>
|
||||||
|
|||||||
Reference in New Issue
Block a user