From 086b2ac74fa00f2b8ce2e88fd6cf3f95127d89d6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 31 Aug 2026 21:38:12 +0300 Subject: [PATCH 1/4] Switch to textContent --- _layouts/default.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 1b783a8..657f764 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -78,7 +78,7 @@ var order, li = navLis[i]; if (li.classList.contains('nav-header')) { - section = li.textContent || li.innerText; + section = li.textContent || li.textContent; sections.push(section); headers[section] = li; continue; @@ -116,14 +116,14 @@ button.className = 'copy-button'; button.type = 'button'; button.ariaLabel = 'Copy code to clipboard'; - button.innerText = 'Copy'; + button.textContent = 'Copy'; button.addEventListener('click', function() { - var code = codeBlock.querySelector('code').innerText; + var code = codeBlock.querySelector('code').textContent; navigator.clipboard.writeText(code).then(function() { - button.innerText = 'Copied!'; + button.textContent = 'Copied!'; setTimeout(function() { - button.innerText = 'Copy'; + button.textContent = 'Copy'; }, 2000); }).catch(function(err) { console.error('Failed to copy: ', err); From 904126ef36cfadbbcf6ab2341b06ec631e75b6c6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 31 Aug 2026 21:41:23 +0300 Subject: [PATCH 2/4] Sort navigation in Liquid instead of JS --- _includes/navigation.html | 13 ++--- _layouts/default.html | 48 ------------------- _posts/2015-09-25-command-line-interface.md | 2 +- .../2015-09-25-frequently-asked-questions.md | 2 +- _posts/2015-09-25-general-usage.md | 2 +- _posts/2015-09-25-preferences.md | 2 +- _posts/2015-09-25-running-from-source-code.md | 1 + .../2015-09-25-shred-files-and-wipe-disks.md | 2 +- _posts/2015-09-25-winapp2ini.md | 2 +- _posts/2015-09-30-install-on-linux.md | 2 +- _posts/2018-03-14-troubleshooting.md | 2 +- _posts/2018-05-12-audit.md | 1 + _posts/2019-08-14-chaff.md | 2 +- _posts/2021-04-17-testing.md | 1 + _posts/2026-03-18-cookie-manager.md | 2 +- _posts/2026-04-29-expert-mode.md | 2 +- 16 files changed, 21 insertions(+), 65 deletions(-) diff --git a/_includes/navigation.html b/_includes/navigation.html index 8b36c60..e0c71a8 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -4,12 +4,13 @@ {% assign attr = section[0] %} {% assign label = section[1] %} - {% for page in site.categories[attr] %} - {% if forloop.first %} - - {% endif %} -
  • {{ page.nav_title | default: page.title }}
  • - {% endfor %} + {% if site.categories[attr] %} + {% assign pages = site.categories[attr] | sort: 'order' %} + + {% for page in pages %} +
  • {{ page.nav_title | default: page.title }}
  • + {% endfor %} + {% endif %} {% endfor %} diff --git a/_layouts/default.html b/_layouts/default.html index 657f764..2d70e79 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -61,54 +61,6 @@ - {% if site.google_analytics_id != "" %} + {%- if site.google_analytics_id != "" %} {% include google_analytics.html %} - {% endif %} + {%- endif %} diff --git a/_layouts/page.html b/_layouts/page.html index 6d5fdc1..ed2f340 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -5,7 +5,9 @@ {{ content }} diff --git a/_posts/2015-09-25-frequently-asked-questions.md b/_posts/2015-09-25-frequently-asked-questions.md index 3548cdd..2bab555 100644 --- a/_posts/2015-09-25-frequently-asked-questions.md +++ b/_posts/2015-09-25-frequently-asked-questions.md @@ -7,12 +7,12 @@ date: 2015-09-25 23:30:16 order: 8 --- -{% assign main_faqs = site.data.faqs.main %} +{%- assign main_faqs = site.data.faqs.main -%} {% include faqs.html faqs=main_faqs heading=false %} ## Things to know While these may not be asked, they are not common knowledge: -{% assign extra_faqs = site.data.faqs.things_to_know %} +{%- assign extra_faqs = site.data.faqs.things_to_know -%} {% include faqs.html faqs=extra_faqs %} From 3317878cf39c7fe1383b0fe323ffb7fa6ce04e9e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 31 Aug 2026 21:56:35 +0300 Subject: [PATCH 4/4] Strip trailing newline from copied code blocks --- _layouts/default.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 7a5245d..1379a57 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -71,7 +71,8 @@ button.textContent = 'Copy'; button.addEventListener('click', function() { - var code = codeBlock.querySelector('code').textContent; + // Rouge always ends the block with a newline + var code = codeBlock.querySelector('code').textContent.replace(/\n+$/, ''); navigator.clipboard.writeText(code).then(function() { button.textContent = 'Copied!'; setTimeout(function() {