1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-02 05:57:46 +00:00

Compare commits

...

6 commits

10 changed files with 38 additions and 28 deletions

View file

@ -19,12 +19,12 @@ def main [] {
ssh -tt nine $" ssh -tt nine $"
cd site 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) ./ sync ("nine:site/" + $dest_directory) ./
} else { } else {
LUME_DRAFTS=false deno ...$deno_arguments LUME_DRAFTS=false deno ...$deno_arguments | ignore
} }
cd $dest_directory cd $dest_directory

20
site.ts
View file

@ -40,7 +40,15 @@ site.data("color", color);
site.add("."); 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) => { pages.forEach((page) => {
const document = page.document; const document = page.document;
@ -156,14 +164,18 @@ site.process([".html"], (pages) => {
footnotes.remove(); footnotes.remove();
} }
} }
}); }));
});
site.use(extractDate()); site.use(extractDate());
site.use(redirects()); site.use(redirects());
site.use(tailwindcss()); site.use(tailwindcss());
site.use(codeHighlight()); site.use(codeHighlight({
options: {
classPrefix: "token-",
noHighlightRe: /^no-highlight$/,
},
}));
site.use(resolveUrls()); site.use(resolveUrls());
site.use(slugifyUrls({ site.use(slugifyUrls({

View file

@ -1,6 +1,6 @@
{{ function process(entry, toplevel = false) }} {{ function process(entry, toplevel = false) }}
<div class="relative p-4{{ if !toplevel }} my-4 md:mx-8{{ /if }} border-1 bg-white dark:bg-black"> <div class="relative p-4{{ if !toplevel }} my-4 md:mx-8{{ /if }} border-1 bg-white dark:bg-black">
{{ if entry.data.title }} {{ if entry.data.url }}
<a <a
class=" class="
reset reset

View file

@ -5,7 +5,7 @@ title: A B O U T
<div class="flex justify-center"> <div class="flex justify-center">
``` ```no-highlight
\'. \'.
\ '. \ \\ / \ '. \ \\ /
\ \ ===+===\X // \ \ ===+===\X //

View file

@ -280,31 +280,31 @@ body {
dark:bg-[#111] dark:shadow-[4px_4px_#bbb]; dark:bg-[#111] dark:shadow-[4px_4px_#bbb];
} }
.hljs-attr { .token-attr {
@apply text-[darkblue] dark:text-[lightblue]; @apply text-[darkblue] dark:text-[lightblue];
} }
.hljs-built_in { .token-built_in {
@apply text-[darkred] dark:text-[firebrick]; @apply text-[darkred] dark:text-[firebrick];
} }
.hljs-comment { .token-comment {
@apply italic text-[dimgray] dark:text-[darkgray]; @apply italic text-[dimgray] dark:text-[darkgray];
} }
.hljs-keyword { .token-keyword {
@apply text-[darkred] dark:text-[firebrick]; @apply text-[darkred] dark:text-[firebrick];
} }
.hljs-number { .token-number {
@apply text-[darkslateblue] dark:text-[mediumslateblue]; @apply text-[darkslateblue] dark:text-[mediumslateblue];
} }
.hljs-string { .token-string {
@apply text-[darkgreen] dark:text-[limegreen]; @apply text-[darkgreen] dark:text-[limegreen];
} }
.hljs-symbol { .token-symbol {
@apply text-[darkgoldenrod] dark:text-[gold]; @apply text-[darkgoldenrod] dark:text-[gold];
} }
.hljs-title { .token-title {
@apply text-[indianred] dark:text-[lightcoral]; @apply text-[indianred] dark:text-[lightcoral];
} }
.hljs-type { .token-type {
@apply text-[darkcyan] dark:text-[aquamarine]; @apply text-[darkcyan] dark:text-[aquamarine];
} }
} }

View file

@ -1,7 +1,4 @@
--- ---
title: Test
description: "Testing"
draft: true draft: true
--- ---

View file

@ -22,7 +22,7 @@ on, `hwmon4` under this directory corresponds to the CPU.
Let's run a `tree`: Let's run a `tree`:
``` ```no-highlight
/sys/class/hwmon/hwmon4 -> ../../devices/platform/coretemp.0/hwmon/hwmon4 /sys/class/hwmon/hwmon4 -> ../../devices/platform/coretemp.0/hwmon/hwmon4
├── device -> ../../../coretemp.0 ├── device -> ../../../coretemp.0
│ ├── driver_override │ ├── driver_override
@ -169,7 +169,7 @@ Let's run a `tree`:
Let's `cat` all the `_label` files: Let's `cat` all the `_label` files:
``` ```no-highlight
/sys/class/hwmon/hwmon4/temp1_label: /sys/class/hwmon/hwmon4/temp1_label:
Package id 0 Package id 0
/sys/class/hwmon/hwmon4/temp2_label: /sys/class/hwmon/hwmon4/temp2_label:

View file

@ -1,7 +1,3 @@
---
title: Analytics
---
This site and other websites under this domain run This site and other websites under this domain run
[Plausible](https://plausible.io/) analytics on a self-hosted instance at [Plausible](https://plausible.io/) analytics on a self-hosted instance at
[shekels.rgbcu.be](https://shekels.rgbcu.be/). [shekels.rgbcu.be](https://shekels.rgbcu.be/).

View file

@ -0,0 +1,3 @@
The website of RGBCube is up.
This webpage is **absolutely never** wrong.

View file

@ -25,12 +25,14 @@ prevent_zoom: true
nuclear nuclear
` }} ` }}
{{> const underline = `underline decoration-4 decoration-black underline-offset-9` }}
{{ set cube_face_front }} {{ set cube_face_front }}
<a draggable="false" class="{{ style }}" href="/about/">about</a> <a draggable="false" class="{{ style }}" href="/about/">about</a>
{{ /set }} {{ /set }}
{{ set cube_face_back }} {{ set cube_face_back }}
<a draggable="false" class="{{ style }}" href="/dump/">dump</a> <a draggable="false" class="{{ style }} {{ underline }}" href="/dump/">dump</a>
{{ /set }} {{ /set }}
{{ set cube_face_top }} {{ set cube_face_top }}
@ -42,7 +44,7 @@ prevent_zoom: true
{{ /set }} {{ /set }}
{{ set cube_face_left }} {{ set cube_face_left }}
<a draggable="false" class="{{ style }}" href="/blog/">blog</a> <a draggable="false" class="{{ style }} {{ underline }}" href="/blog/">blog</a>
{{ /set }} {{ /set }}
{{ set cube_face_bottom }} {{ set cube_face_bottom }}