From 21ac6f2b85d6b604e24cf8b84bc47e2729fe2e39 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 8 Jun 2025 15:54:55 +0300 Subject: [PATCH 1/6] cube: add underline to text that looks confusing when upside down --- site/index.vto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/index.vto b/site/index.vto index 8d6a1b4..dd9acad 100644 --- a/site/index.vto +++ b/site/index.vto @@ -25,12 +25,14 @@ prevent_zoom: true nuclear ` }} +{{> const underline = `underline decoration-4 decoration-black underline-offset-9` }} + {{ set cube_face_front }} about {{ /set }} {{ set cube_face_back }} - dump + dump {{ /set }} {{ set cube_face_top }} @@ -42,7 +44,7 @@ prevent_zoom: true {{ /set }} {{ set cube_face_left }} - blog + blog {{ /set }} {{ set cube_face_bottom }} From de3342507805a4b0877472d696cc3761c89d7590 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 8 Jun 2025 16:38:18 +0300 Subject: [PATCH 2/6] dump(site.availability): update --- site/dump/site/availability.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 site/dump/site/availability.md diff --git a/site/dump/site/availability.md b/site/dump/site/availability.md new file mode 100644 index 0000000..5ef3ba3 --- /dev/null +++ b/site/dump/site/availability.md @@ -0,0 +1,7 @@ +--- +title: Availability +--- + +The website of RGBCube is up. + +This webpage is **absolutely never** wrong. From bd49960b65ec2f26722ef51c05926779e4661fa7 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 8 Jun 2025 17:58:48 +0300 Subject: [PATCH 3/6] treewide: set title from basename if it doesn't exist --- site.ts | 13 ++++++++++--- site/_includes/map.vto | 2 +- site/blog/2024-01-01-test.md | 3 --- site/dump/site/analytics.md | 4 ---- site/dump/site/availability.md | 4 ---- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/site.ts b/site.ts index e0afa70..54e22fa 100644 --- a/site.ts +++ b/site.ts @@ -40,7 +40,15 @@ site.data("color", color); site.add("."); -site.process([".html"], (pages) => { +site.preprocess([".html"], (pages) => + pages.forEach((page) => { + page.data.title = page.data.title ?? + page.data.basename + .replace(/-/g, " ") + .replace(/\b\w/g, (char) => char.toUpperCase()); + })); + +site.process([".html"], (pages) => pages.forEach((page) => { const document = page.document; @@ -156,8 +164,7 @@ site.process([".html"], (pages) => { footnotes.remove(); } } - }); -}); + })); site.use(extractDate()); site.use(redirects()); diff --git a/site/_includes/map.vto b/site/_includes/map.vto index d3411c1..6c007ec 100644 --- a/site/_includes/map.vto +++ b/site/_includes/map.vto @@ -1,6 +1,6 @@ {{ function process(entry, toplevel = false) }}
- {{ if entry.data.title }} + {{ if entry.data.url }} Date: Sun, 8 Jun 2025 18:08:01 +0300 Subject: [PATCH 4/6] apply: ignore lume outputs --- apply.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apply.nu b/apply.nu index 7f36f28..5836289 100755 --- a/apply.nu +++ b/apply.nu @@ -19,12 +19,12 @@ def main [] { ssh -tt nine $" cd site - LUME_DRAFTS=false nix run nixpkgs#deno -- ($deno_arguments | str join ' ') + LUME_DRAFTS=false nix run nixpkgs#deno -- ($deno_arguments | str join ' ') | ignore " sync ("nine:site/" + $dest_directory) ./ } else { - LUME_DRAFTS=false deno ...$deno_arguments + LUME_DRAFTS=false deno ...$deno_arguments | ignore } cd $dest_directory From 20bc217a1545a9b20f854bdb2323b8fc8fb5ae75 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 8 Jun 2025 18:08:43 +0300 Subject: [PATCH 5/6] highlight: set class prefix to token- and ignore no-highlight to suppress errors --- site.ts | 7 ++++++- site/assets/css/default.css | 18 +++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/site.ts b/site.ts index 54e22fa..cbd568a 100644 --- a/site.ts +++ b/site.ts @@ -170,7 +170,12 @@ site.use(extractDate()); site.use(redirects()); site.use(tailwindcss()); -site.use(codeHighlight()); +site.use(codeHighlight({ + options: { + classPrefix: "token-", + noHighlightRe: /^no-highlight$/, + }, +})); site.use(resolveUrls()); site.use(slugifyUrls({ diff --git a/site/assets/css/default.css b/site/assets/css/default.css index 558bbaa..444f01b 100644 --- a/site/assets/css/default.css +++ b/site/assets/css/default.css @@ -280,31 +280,31 @@ body { dark:bg-[#111] dark:shadow-[4px_4px_#bbb]; } - .hljs-attr { + .token-attr { @apply text-[darkblue] dark:text-[lightblue]; } - .hljs-built_in { + .token-built_in { @apply text-[darkred] dark:text-[firebrick]; } - .hljs-comment { + .token-comment { @apply italic text-[dimgray] dark:text-[darkgray]; } - .hljs-keyword { + .token-keyword { @apply text-[darkred] dark:text-[firebrick]; } - .hljs-number { + .token-number { @apply text-[darkslateblue] dark:text-[mediumslateblue]; } - .hljs-string { + .token-string { @apply text-[darkgreen] dark:text-[limegreen]; } - .hljs-symbol { + .token-symbol { @apply text-[darkgoldenrod] dark:text-[gold]; } - .hljs-title { + .token-title { @apply text-[indianred] dark:text-[lightcoral]; } - .hljs-type { + .token-type { @apply text-[darkcyan] dark:text-[aquamarine]; } } From eedc332bbedddb9876957dc5960ea6f9b6dd0db6 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 8 Jun 2025 21:50:50 +0300 Subject: [PATCH 6/6] treewide: annotate stuff with no-highlight --- site/about.md | 2 +- site/blog/2025-06-05-why-cores.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/about.md b/site/about.md index 187c8e8..e74e17d 100644 --- a/site/about.md +++ b/site/about.md @@ -5,7 +5,7 @@ title: A B O U T
-``` +```no-highlight \'. \ '. \ \\ / \ \ ===+===\X // diff --git a/site/blog/2025-06-05-why-cores.md b/site/blog/2025-06-05-why-cores.md index 5a31729..7ad61b9 100644 --- a/site/blog/2025-06-05-why-cores.md +++ b/site/blog/2025-06-05-why-cores.md @@ -22,7 +22,7 @@ on, `hwmon4` under this directory corresponds to the CPU. Let's run a `tree`: -``` +```no-highlight /sys/class/hwmon/hwmon4 -> ../../devices/platform/coretemp.0/hwmon/hwmon4 ├── device -> ../../../coretemp.0 │ ├── driver_override @@ -169,7 +169,7 @@ Let's run a `tree`: Let's `cat` all the `_label` files: -``` +```no-highlight /sys/class/hwmon/hwmon4/temp1_label: Package id 0 /sys/class/hwmon/hwmon4/temp2_label: