diff --git a/.agents/rules/blog-system.md b/.agents/rules/blog-system.md deleted file mode 100644 index 1e87418..0000000 --- a/.agents/rules/blog-system.md +++ /dev/null @@ -1,87 +0,0 @@ -# Technical Blog System Rules & Architecture Directives - -## 1. Core Invariant: User Content Sovereignty (Highest Priority) -1. **User Edits Are Absolute Ground Truth:** - - The user's edits, custom writing, post titles, navigation labels, terminology, and naming choices are the absolute highest level of truth in this codebase. - - They strictly take precedence over any background content description, sample design mockup (`sample-designs/*`), skill instructions, or default boilerplate. -2. **Strict Prohibition on Unsolicited Rewriting or Renaming:** - - You must **NEVER** revert, alter, overwrite, or substitute user-authored text, titles, navigation labels, tags, or naming conventions unless the user directly and explicitly requests that specific modification. - - Do not reintroduce removed text or names from prior mockups or commits. -3. **Mandatory Clarification Gate:** - - If you notice a potential inconsistency, typo, or naming ambiguity in user-authored content, you must **NOT** unilaterally modify it. - - You must ask the user for specific clarification before altering any user-authored writing or naming. -4. **Sample Designs Are Layout References Only:** - - Files in `sample-designs/` serve solely as visual, CSS, and structural layout references. - - Never extract or re-inject titles, domain names, service labels, or technical copy from `sample-designs/` into active templates or site data without explicit instruction. - ---- - -## 2. Pedagogical Explanations (Interactive Learning) -1. **Explain the Code:** Whenever creating or refactoring code (Eleventy configuration, Nunjucks templates, CSS modules, build scripts), provide a clear, educational breakdown. -2. **Break Down Key Concepts:** Explain *why* a particular Eleventy filter, Nunjucks tag, or CSS variable structure was used so the user learns the foundational concepts. -3. **No Magic:** Avoid opaque or overly clever abstractions; prioritize readable, idiomatic code with commentary explaining tricky points. - ---- - -## 3. CSS Architecture & Isolation -1. **Zero Monolithic Inlines:** Do not inject raw ` - - - -
- - -
-
- - RIVER ROOKS // ARTICLE VIEWER -
- -
- - -
- - - - - -
- - -
-
- ~/notes/ - > - iot-firmware-spi-extraction.md -
- -

Reverse Engineering IoT Firmware: SPI Flash Extraction

- - -
- - -
- - -

1.0 Executive Summary

-

- In security audits of embedded systems, retrieving the firmware image is the critical foundational step. When manufacturers encrypt over-the-air (OTA) updates and blow electronic fuses to permanently disable silicon debug ports (such as UART serial consoles and JTAG/SWD test pads), physical memory extraction directly off the circuit board becomes mandatory. -

-

- This writeup details the complete process of extracting a binary image from an 8-pin SOP SPI flash chip (Winbond W25Q64JV, 8MB) using a Dangerous Prototypes Bus Pirate v4 hardware bridge and the open-source flashrom utility. -

- - -
-
[!NOTE] Target Board Isolation
-

- Always de-solder the SPI flash chip or clamp using an SOP8 test clip with the host microcontroller's reset line (/RESET) driven low to prevent the main SoC from contending on the SPI bus. -

-
- - -

2.0 Hardware Pinout & Bus Pirate Setup

-

- The target is an 8-pin Small Outline Package (SOP-8). Pin 1 is easily identified by the circular depression in the epoxy mold. Connect the Bus Pirate flying leads directly according to the standard SPI protocol mapping: -

- -

2.1 SOP8 Pinout Matrix

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SOP8 Pin #Signal NameBus Pirate LeadElectrical Purpose
1/CSCS (White)Chip Select (Active Low)
2DO (MISO)MISO (Black)Serial Data Output from Flash
3/WP+3.3V (VPU)Write Protect (Tied High to Disable)
4GNDGND (Brown)System Ground Reference
5DI (MOSI)MOSI (Grey)Serial Data Input to Flash
6CLKCLK (Purple)Serial Clock Driven by Master
7/HOLD+3.3V (VPU)Hold / Suspend Input (Tied High)
8VCC+3.3V (Red)Supply Voltage (Nominal 3.3V DC)
-
- -
-
[!WARNING] Electrical Voltage Rating
-

- Verify whether your target chip is a 3.3V part (e.g., W25Q64FV) or a 1.8V part (e.g., W25Q64FW). Supplying 3.3V logic to a 1.8V chip will permanently destroy the silicon junction gates. -

-
- - -

3.0 SPI Extraction via flashrom

-

- Plug the Bus Pirate into your analysis workstation via USB. It registers as /dev/ttyUSB0. Query the chip ID register using the 0x9F JEDEC Read ID command: -

- - -
-
-
- extract_firmware.sh - POSIX sh -
- -
-
#!/bin/sh
-# Query the SPI flash details using flashrom via Bus Pirate
-flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=1M -r firmware_dump1.bin
-
-# Repeat extraction to create a secondary dump for comparison
-flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=1M -r firmware_dump2.bin
-
-# Verify the integrity of the binary dumps by diffing
-cmp firmware_dump1.bin firmware_dump2.bin
-if [ $? -eq 0 ]; then
-  echo "[+] SPI Dumps match identically! Proceeding to hashing..."
-  md5sum firmware_dump1.bin
-  sha256sum firmware_dump1.bin
-else
-  echo "[-] Bit flip or voltage sag detected! Re-run extraction." >&2
-  exit 1
-fi
-
- -

- Press Ctrl + C if the bus fails to synchronize. Once complete, inspect the initial bytes with xxd or hexdump: -

- -
-
-
- stdout: hexdump inspection - Hex View -
- -
-
0000000: 2705 1956 7062 8251 60a4 2130 0041 5262  '..Vpb.Q`.!0.ARb
-0000010: 6873 7173 0000 0004 0000 0000 0000 1000  hsqs............
-0000020: 0002 0001 0000 0000 636f 6e66 6967 2e64  ........config.d
-
- -

- Notice the magic bytes 6873 7173 (ASCII representation: hsqs) at offset 0x000010. This confirms the presence of a SquashFS compressed root filesystem! -

- - -

4.0 Binary Verification & Hashes

-

- Before proceeding with automated deconstruction using binwalk -Me, record cryptographic hashes in your lab notebook: -

- -
    -
  • Dump Size: 8,388,608 bytes (8192 KiB)
  • -
  • MD5: d41d8cd98f00b204e9800998ecf8427e
  • -
  • SHA-256: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
  • -
- - -

5.0 Audit Checklist

-

- Ensure all forensics hygiene steps have been recorded: -

- -
    -
  • - ✓ - Visual optical inspection and pinout diagram documented -
  • -
  • - ✓ - Clean dual flashrom dumps matching via bitwise cmp -
  • -
  • - ✓ - SquashFS magic header identified at offset 0x10 -
  • -
  • - • - Filesystem extraction and hardcoded credentials analysis (Part 2) -
  • -
- -
- -
- -
- - - - -
- - - - - diff --git a/sample-designs/blog-tiling-lead.html b/sample-designs/blog-tiling-lead.html deleted file mode 100644 index 3bc4873..0000000 --- a/sample-designs/blog-tiling-lead.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - - - River Rooks | Blog Lander (Tiling Hero & Feed) - - - - -
- - -
-
- - RIVER ROOKS // BLOG & RESEARCH ARCHIVE -
- -
- - -
-
TECHNICAL PUBLICATION REPOSITORY • ~/NOTES/INDEX.MD
-

Engineering Notes, CTF Write-Ups & Systems Architecture

- -

- Documenting bare-metal systems, embedded hardware audits, and network isolation architectures. Writing zero-allocation POSIX scripts, reverse engineering production microcontrollers, and analyzing memory allocator exploitation primitives. -

- -
- TOPIC FILTER: - - - - - -
-
- - -
- - -
-
-
- // PINNED RESEARCH WRITE-UP -
- SPI FLASH • 8 MIN READ -
- - -
- - -
- - -
-
-
- // ARCHIVE TELEMETRY -
- STATIC HTML -
- - -
- - -
-
-
- // RESEARCH TRACKS -
- CURATED -
- -
- -
> Embedded & Hardware Forensics
-
Flash memory dumping, bus tapping, silicon pinout discovery.
-
- -
> Network Routing & Homelab
-
Traefik reverse proxying, WireGuard full-mesh, VLAN firewalls.
-
- -
> Low-Level Memory Exploitation
-
glibc tcache safe-linking, heap corruption, House of Apple.
-
-
-
- -
- -
- - -
-
-
- // CHRONOLOGICAL DISPATCHES FEED -
- ALL ARTICLES ORDERED BY DATE -
- -
- - -
-
- - ~/notes/ha-traefik-docker.md -
-

- > Building a High-Availability Traefik Router with Docker Compose -

-

- Architecting automated TLS wildcard certificate propagation, Docker provider label routing, zero-downtime container updates, and backend health-check failover routes on bare-metal infrastructure. -

-
-
- [#homelab] - [#docker-traefik] - [#networking] -
- Read Entry → -
-
- - -
-
- - ~/notes/posix-sh-vs-bash.md -
-

- > POSIX sh vs. Bash: Portability in Modern Scripts -

-

- Analyzing edge-case incompatibilities, syntax overhead, eliminating bashisms, and writing fast, bulletproof bootstrapping scripts for Alpine and embedded targets conforming to IEEE Std 1003.1. -

-
-
- [#posix-sh] - [#shell] - [#unix] -
- Read Entry → -
-
- - -
-
- - ~/notes/ctf-heap-glibc-2-35.md -
-

- > CTF Write-up: Heap Exploitation in glibc 2.35 -

-

- Deconstructing modern glibc memory allocator defenses: tcache safe-linking pointer mangling, bypass primitives, and House of Apple file structure hijacking for arbitrary code execution. -

-
-
- [#ctf] - [#binary-exploitation] - [#security] -
- Read Entry → -
-
- - -
-
- - ~/notes/zero-trust-wireguard-opnsense.md -
-

- > Zero-Trust Network Isolation with WireGuard & OPNsense VLANs -

-

- Designing strict zone-based firewall rules across isolated VLANs (Management, Server DMZ, IoT, Trusted Clients) with point-to-point WireGuard cryptographic routing. -

-
-
- [#networking] - [#wireguard] - [#security] -
- Read Entry → -
-
- -
-
- - - - -
- - - - - diff --git a/sample-designs/design-specification.md b/sample-designs/design-specification.md deleted file mode 100644 index 078ff06..0000000 --- a/sample-designs/design-specification.md +++ /dev/null @@ -1,81 +0,0 @@ -# Project Brief: Technical Web Architecture & Blog - -**Project Type:** Personal Blog & Technical Documentation Site -**Design Philosophy:** High-signal, low-noise. Developer-centric minimalism. -**Vibe/Comparisons:** Zed Editor, Ghostty, Noctalia.dev. -**Strictly Avoid:** Raycast, Astro, Vercel-style "SaaS" aesthetics. - -## 1. Executive Summary -This project requires a web interface that feels like a native development environment or terminal emulator, not a marketing page. The design must prioritize raw performance, keyboard navigability, and information density. It should evoke the craftsmanship of tiling window managers and modal text editors. - -The content will heavily feature deep technical writing, including CTF write-ups, network routing diagrams, Docker/Traefik architectures, and raw code snippets (Lua, POSIX `sh`, and Python). The design must accommodate high-density information without visual clutter. - ---- - -## 2. Global Rules & Anti-Patterns - -To achieve the correct aesthetic, the designer must adhere to strict constraints. - -> **The "Do Not Use" List** -> * **NO Glassmorphism:** Zero use of `backdrop-filter: blur()`, frosted glass, or translucent overlays. -> * **NO Glows or Drop Shadows:** Elements should not float, glow, or cast shadows. Depth is created through crisp 1px borders and distinct surface colors. -> * **NO Gradients:** Avoid sweeping linear or radial gradients. Stick to solid colors. -> * **NO Spring Animations:** Avoid floaty, delayed transitions. -> * **NO Rounded Blobs:** Keep border-radii minimal (0px to 4px max). Sharp corners are preferred. - ---- - -## 3. Typography System - -The typographical hierarchy is a hybrid system utilizing monospace fonts for structural elements and a clean sans-serif for long-form reading. - -| Usage | Font Family Preference | Weight | Role | -| :--- | :--- | :--- | :--- | -| **Structural / UI** | IBM Plex Mono, JetBrains Mono | Regular (400), Medium (500) | Navigation links, metadata, dates, tags, timestamps, buttons. | -| **Code Blocks** | JetBrains Mono, Fira Code | Regular (400) | Inline code snippets, terminal command blocks, scripts. | -| **Body Prose** | Inter, Geist Sans, Roboto | Regular (400) | Standard article paragraphs, lists. | -| **Headings (H1-H3)**| IBM Plex Mono (or Sans variant) | Bold (700) | Article titles, section headers. | - -**Typographical Constraints:** -* **Line Height:** `1.6` to `1.7` for prose. -* **Max Width:** Cap article text at `65ch` (characters) for optimal readability. - ---- - -## 4. Color Palette (Dark Mode Native) - -The site does not need a light mode. It should be built as a dark-mode native experience using a muted, low-saturation charcoal palette, mimicking a modern terminal or IDE. - -* **Base Canvas (`#121417` or `#0d0f12`):** A deep slate/charcoal. Not pure black (`#000000`), which causes eye strain. -* **Surface / Card (`#1c1f26`):** Slightly lighter than the canvas for article blocks or terminal windows. -* **Borders & Dividers (`#2b303b`):** Subtle, low-contrast 1px solid lines used to define grids and separate content. -* **Primary Text (`#e0e6f0`):** Off-white/light ash for prose. -* **Muted Text (`#8a95a5`):** For timestamps, metadata, and non-essential UI text. -* **Accent Color (Designer's Choice):** One single, vibrant terminal color (e.g., ANSI Green, Amber, or Cyan) used sparingly for active states, link hovers, or terminal prompts (like `>`). - ---- - -## 5. Layout & Component Architecture - -The layout should be heavily grid-based, feeling structural and deliberate. - -### Core Components Needed -1. **Terminal-Style Code Blocks:** Must support syntax highlighting. Should include a simple header (e.g., showing the filename like `config.lua` or `docker-compose.yml`) with a 1px border. -2. **Metadata Tags:** Small, monospaced inline blocks for categorizing posts (e.g., `[#homelab]`, `[#ctf]`, `[#hyprland]`). -3. **Keyboard Shortcut Hints:** Visual styling for `` elements, rendering as crisp, bordered boxes (e.g., `Ctrl` + `K`). -4. **Index/Archive List:** A dense, tabular list for older posts, prioritized by date, title, and tags, rather than large image thumbnails. - -### Spacing & Grid -* Use a rigid 4pt or 8pt baseline grid. -* Padding inside code blocks and cards should be dense but mathematically consistent. -* Full-bleed horizontal dividers (`
`) should be used to separate major sections instead of large margins. - ---- - -## 6. Interaction & Motion - -Interactivity should mirror command-line interfaces: fast, binary, and unembellished. - -* **Hover States:** Immediate state changes. Instead of fading a button's background over `300ms`, snap the background color instantly or invert the text/background colors. -* **Focus States:** Explicit, high-visibility 1px or 2px solid outlines (using the accent color) when navigating via the `Tab` key. Accessibility and keyboard navigation are paramount. -* **Active Elements:** Use structural indicators (like a `>` prepended to an active navigation link, or a solid left-border block) rather than changing font sizes or scaling elements up. diff --git a/sample-designs/service-gateway-tiling.html b/sample-designs/service-gateway-tiling.html deleted file mode 100644 index 3a856c2..0000000 --- a/sample-designs/service-gateway-tiling.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - River Rooks | Homelab Gateway (Tiling Workspace) - - - - -
- - -
-
- - RIVER ROOKS // NODE GATEWAY -
- -
- - -
-
SYSTEM DECLARATION • RACK-01 NODE GATEWAY
-

Engineering Sovereign Infrastructure & Technical Notes

- -
-

- I am River Rooks, a cybersecurity engineering student at the University of Alabama. My work centers on network forensics, self-hosted system architecture, low-level firmware exploitation, and zero-allocation Unix utilities. -

-

- This website functions as the unified frontend for my physical homelab cluster. Rather than hosting projects on opaque third-party clouds, everything here runs on bare metal in my personal server rack—orchestrated through Proxmox VE, partitioned across isolated VLANs via OPNsense, and protected by point-to-point WireGuard cryptographic meshes. -

-

- Navigation Guide: If you are here to read technical research, the Engineering Blog is linked below with deep write-ups on firmware dumping, heap exploitation, and container routing. If you are here to use tools, the Public Services provide locally hosted instances of CyberChef, Stirling PDF, and Git. -

-
- -
- PRIMARY DESTINATIONS: - [1] Technical Blog (5 Articles) • - [2] Forgejo Git Repos • - [3] Public Cryptographic & PDF Tools • - [4] Cluster Telemetry -
-
- - -
- - -
- - -
-
-
- // PRIMARY SERVICE: THE TECHNICAL BLOG -
- ~/notes/ • 5 ARTICLES -
- - -
- -
- - -
- - -
-
-
- // HOMELAB SERVICES ROUTER -
- 4 PUBLIC TOOLS -
- - -
- - -
-
-
- // HARDWARE NODES (RACK-01) -
- 10GbE SFP+ -
- -
-
-
- gw-node01.lan - OPNsense 24.7 -
- CPU: 18% | RAM: 32% -
- -
-
- pve-node02.lan - Proxmox VE (AMD 5900X) -
- CPU: 42% | RAM: 68% -
- -
-
- nas-node03.lan - TrueNAS (48TB RaidZ2) -
- CPU: 14% | RAM: 82% -
-
-
- -
- -
- - - - -
- - - diff --git a/server.js b/server.js deleted file mode 100644 index 84afa63..0000000 --- a/server.js +++ /dev/null @@ -1,136 +0,0 @@ -import http from "node:http"; -import fs from "node:fs"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; - -const MIME_TYPES = { - ".html": "text/html; charset=utf-8", - ".css": "text/css; charset=utf-8", - ".js": "application/javascript; charset=utf-8", - ".mjs": "application/javascript; charset=utf-8", - ".json": "application/json; charset=utf-8", - ".xml": "application/xml; charset=utf-8", - ".svg": "image/svg+xml", - ".png": "image/png", - ".jpg": "image/jpeg", - ".jpeg": "image/jpeg", - ".webp": "image/webp", - ".gif": "image/gif", - ".ico": "image/x-icon", - ".woff": "font/woff", - ".woff2": "font/woff2", - ".ttf": "font/ttf", - ".txt": "text/plain; charset=utf-8" -}; - -/** - * Creates the HTTP server instance for serving static files from _site - * @param {string} [customSiteDir] Optional custom directory to serve from - * @returns {http.Server} - */ -export function createServer(customSiteDir) { - const siteDir = path.resolve(customSiteDir || path.join(process.cwd(), "_site")); - - return http.createServer((req, res) => { - // Standard security headers - res.setHeader("X-Content-Type-Options", "nosniff"); - res.setHeader("X-Frame-Options", "DENY"); - res.setHeader("Referrer-Policy", "strict-origin-when-cross-origin"); - - const parsedUrl = new URL(req.url, "http://localhost"); - - // Health check endpoint for container orchestrators & telemetry - if (parsedUrl.pathname === "/healthz" || parsedUrl.pathname === "/health") { - res.writeHead(200, { "Content-Type": "application/json; charset=utf-8" }); - res.end(JSON.stringify({ status: "ok", uptime: process.uptime() })); - return; - } - - // Path normalization & security validation against directory traversal - let decodedPath = ""; - try { - decodedPath = decodeURIComponent(parsedUrl.pathname); - } catch { - res.writeHead(400, { "Content-Type": "text/plain" }); - res.end("Bad Request"); - return; - } - - const resolvedPath = path.resolve(siteDir, `.${decodedPath}`); - - // Boundary check: ensure target path is within siteDir - if (!resolvedPath.startsWith(siteDir)) { - res.writeHead(403, { "Content-Type": "text/plain" }); - res.end("Forbidden"); - return; - } - - let targetFile = resolvedPath; - - // Directory index resolution - if (fs.existsSync(targetFile) && fs.statSync(targetFile).isDirectory()) { - targetFile = path.join(targetFile, "index.html"); - } - - // Clean URL extensionless fallback (/posts/my-post -> /posts/my-post.html) - if (!fs.existsSync(targetFile) && fs.existsSync(`${targetFile}.html`)) { - targetFile = `${targetFile}.html`; - } - - // Check if target file exists and is a regular file - if (fs.existsSync(targetFile) && fs.statSync(targetFile).isFile()) { - const ext = path.extname(targetFile).toLowerCase(); - const contentType = MIME_TYPES[ext] || "application/octet-stream"; - - // Cache control: assets get long-term caching, html gets short - if (decodedPath.startsWith("/assets/")) { - res.setHeader("Cache-Control", "public, max-age=2592000, immutable"); - } else { - res.setHeader("Cache-Control", "public, max-age=0, must-revalidate"); - } - - res.writeHead(200, { "Content-Type": contentType }); - const stream = fs.createReadStream(targetFile); - stream.pipe(res); - return; - } - - // 404 Not Found fallback - const custom404 = path.join(siteDir, "404.html"); - if (fs.existsSync(custom404)) { - res.writeHead(404, { "Content-Type": "text/html; charset=utf-8" }); - fs.createReadStream(custom404).pipe(res); - } else { - res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" }); - res.end("404 Not Found"); - } - }); -} - -// Direct CLI execution handler -const currentFilePath = fileURLToPath(import.meta.url); -if (process.argv[1] && path.resolve(process.argv[1]) === currentFilePath) { - const port = parseInt(process.env.PORT || "8080", 10); - const host = process.env.HOST || "0.0.0.0"; - const siteDir = path.resolve(process.cwd(), "_site"); - - if (!fs.existsSync(siteDir)) { - console.warn(`[Static Server] Warning: '${siteDir}' does not exist yet. Run 'npm run build' first.`); - } - - const server = createServer(); - server.listen(port, host, () => { - console.log(`[Static Server] Serving '${siteDir}' on http://${host}:${port}`); - }); - - // Graceful termination handling - const shutdown = (signal) => { - console.log(`\n[Static Server] Received ${signal}. Shutting down gracefully...`); - server.close(() => { - process.exit(0); - }); - }; - - process.on("SIGINT", () => shutdown("SIGINT")); - process.on("SIGTERM", () => shutdown("SIGTERM")); -} diff --git a/src/_data/site.js b/src/_data/site.js deleted file mode 100644 index 11f1331..0000000 --- a/src/_data/site.js +++ /dev/null @@ -1,118 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; - -// Load .env variables into process.env if SITE_DOMAIN is not already defined -if (!process.env.SITE_DOMAIN) { - try { - const envPath = path.resolve(process.cwd(), ".env"); - if (fs.existsSync(envPath)) { - const envContent = fs.readFileSync(envPath, "utf-8"); - for (const line of envContent.split("\n")) { - const trimmed = line.trim(); - if (trimmed && !trimmed.startsWith("#") && trimmed.includes("=")) { - const [key, ...vals] = trimmed.split("="); - const value = vals.join("=").trim().replace(/^["']|["']$/g, ""); - if (!process.env[key.trim()]) { - process.env[key.trim()] = value; - } - } - } - } - } catch (e) { - // Silent fallback - } -} - -const siteDomain = process.env.SITE_DOMAIN; -if (!siteDomain) { - throw new Error( - "\n=======================================================================\n" + - "FATAL CONFIGURATION ERROR: SITE_DOMAIN environment variable is not set.\n" + - "The site domain must be explicitly defined in your .env file or environment.\n" + - "Example in .env:\n" + - " SITE_DOMAIN=riverrooks.dev\n" + - "=======================================================================\n" - ); -} -const siteUrl = process.env.SITE_URL || `https://${siteDomain}`; - -export default { - domain: siteDomain, - url: siteUrl, - name: "River Rooks", - title: "River Rooks | Homelab Gateway", - description: "CTF Writeups, Techincal Publucations, Homelab Journey, and Development Projects.", - status: "SYSTEMS NOMINAL", - author: "River Rooks", - nav: [ - { - label: "Home", - url: "/" - }, - { - label: "Dispatches", - url: "/dispatches/" - }, - { - label: "Gitea", - url: `https://git.${siteDomain}`, - external: true - }, - { - label: "RSS Feed", - url: "/feed.xml" - } - ], - services: [ - { - name: "Gitea", - url: `https://git.${siteDomain}`, - tag: `git.${siteDomain}:2222`, - desc: "Self-hosted Git code repositories." - }, - { - name: "CyberChef", - url: `https://chef.${siteDomain}`, - tag: `chef.${siteDomain}:443`, - desc: "Industry tool for analyzing and decoding data." - }, - { - name: "Aperisolve", - url: `https://aperisolve.${siteDomain}`, - tag: `aperisolve.${siteDomain}:443`, - desc: "Basic image steganography suite." - }, - { - name: "Streams", - url: `https://streams.${siteDomain}`, - tag: `streams.${siteDomain}:443`, - desc: "Self-hosted Steam aggregator for wathing live sports." - }, - { - name: "Calibre", - url: `https://library.${siteDomain}`, - tag: `books.${siteDomain}:443`, - desc: `Calibre web frontend for managing and reading eBooks.` - } - ], - topics: [ - { - title: "Systems Engineering", - slug: "systems", - desc: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - badge: "TRACK: SYSTEMS" - }, - { - title: "Security Research", - slug: "security", - desc: "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", - badge: "TRACK: SECURITY" - }, - { - title: "Homelab Infrastructure", - slug: "homelab", - desc: "Ut enim ad minim veniam, quis nostrud exercitation ullamco.", - badge: "TRACK: INFRA" - } - ] -}; diff --git a/src/_filters/index.js b/src/_filters/index.js deleted file mode 100644 index 53e3640..0000000 --- a/src/_filters/index.js +++ /dev/null @@ -1,74 +0,0 @@ -import { DateTime } from "luxon"; - -/** - * Custom Eleventy Filters for River Rooks Blog - */ - -export const postDate = (dateObj) => { - if (!dateObj) return ""; - const date = typeof dateObj === "string" ? new Date(dateObj) : dateObj; - const dt = DateTime.fromJSDate(date, { zone: "utc" }); - if (!dt.isValid) return ""; - return dt.toFormat("LLL dd, yyyy").toUpperCase(); -}; - -export const isoDate = (dateObj) => { - if (!dateObj) return ""; - const date = typeof dateObj === "string" ? new Date(dateObj) : dateObj; - const dt = DateTime.fromJSDate(date, { zone: "utc" }); - if (!dt.isValid) return ""; - return dt.toISODate() || ""; -}; - -export const limit = (arr, count) => { - if (!Array.isArray(arr)) return []; - if (count <= 0) return []; - return arr.slice(0, count); -}; - -export const filterTagList = (tags) => { - const internalTags = ["all", "nav", "post", "posts"]; - if (!tags) return []; - const tagArray = Array.isArray(tags) ? tags : [tags]; - return tagArray.filter((tag) => { - if (typeof tag !== "string") return false; - const clean = tag.replace(/^#/, "").toLowerCase(); - return !internalTags.includes(clean); - }); -}; - -export const readingTime = (text, frontmatterTime) => { - if (frontmatterTime) return frontmatterTime; - if (!text || typeof text !== "string") return "1 MIN READ"; - const clean = text.replace(/<[^>]+>/g, "").trim(); - if (!clean) return "1 MIN READ"; - const words = clean.split(/\s+/).filter(Boolean).length; - const minutes = Math.max(1, Math.ceil(words / 200)); - return `${minutes} MIN READ`; -}; - -export const extractHeadings = (htmlContent) => { - if (!htmlContent || typeof htmlContent !== "string") return []; - const headingRegex = /]*>(.*?)<\/h\1>/gis; - const headings = []; - let match; - while ((match = headingRegex.exec(htmlContent)) !== null) { - headings.push({ - level: parseInt(match[1], 10), - id: match[2], - title: match[3].replace(/<[^>]+>/g, "").trim() - }); - } - return headings; -}; - -export const filters = { - postDate, - isoDate, - limit, - filterTagList, - readingTime, - extractHeadings -}; - -export default filters; diff --git a/src/_includes/layouts/base.njk b/src/_includes/layouts/base.njk deleted file mode 100644 index 2fff564..0000000 --- a/src/_includes/layouts/base.njk +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - {{ title | default(site.title) }} - - - - - - - - - - - {% block head %}{% endblock %} - - -
- {% include "partials/global-bar.njk" %} - -
- {% block content %} - {{ content | safe }} - {% endblock %} -
- - {% include "partials/footer.njk" %} -
- - {% block scripts %}{% endblock %} - - diff --git a/src/_includes/layouts/page.njk b/src/_includes/layouts/page.njk deleted file mode 100644 index 62049a8..0000000 --- a/src/_includes/layouts/page.njk +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "layouts/base.njk" %} - -{% block content %} -
- {{ content | safe }} -
-{% endblock %} diff --git a/src/_includes/layouts/post.njk b/src/_includes/layouts/post.njk deleted file mode 100644 index efff893..0000000 --- a/src/_includes/layouts/post.njk +++ /dev/null @@ -1,93 +0,0 @@ -{% extends "layouts/base.njk" %} - -{% block content %} -
- - - - -
-
- - -

{{ title }}

- - -
- -
- {{ content | safe }} -
-
-
-{% endblock %} diff --git a/src/_includes/macros/tile.njk b/src/_includes/macros/tile.njk deleted file mode 100644 index 2f31a36..0000000 --- a/src/_includes/macros/tile.njk +++ /dev/null @@ -1,30 +0,0 @@ -{# - Reusable Tile Container Macro (macros/tile.njk) - Renders a terminal pane with header, title, meta pill, and custom body slot. - Usage: - {% import "macros/tile.njk" as ui %} - {% call ui.tile(title="STATISTICS", meta="STATIC HTML") %} -

Inside tile

- {% endcall %} -#} - -{% macro tile(title="", meta="", class="", id="") %} -
- {% if title or meta %} -
- {% if title %} -
- - {{ title }} -
- {% endif %} - {% if meta %} - {{ meta }} - {% endif %} -
- {% endif %} -
- {{ caller() }} -
-
-{% endmacro %} diff --git a/src/_includes/partials/featured-card.njk b/src/_includes/partials/featured-card.njk deleted file mode 100644 index c2d4536..0000000 --- a/src/_includes/partials/featured-card.njk +++ /dev/null @@ -1,61 +0,0 @@ -{% set featured = null %} -{% for p in collections.posts %} - {% if p.data.featured and not featured %} - {% set featured = p %} - {% endif %} -{% endfor %} -{% if not featured and collections.posts.length > 0 %} - {% set featured = collections.posts[0] %} -{% endif %} - -{% if featured %} -
-
-
- - FEATURED DISPATCH -
- {{ (featured.data.tags | filterTagList)[0] | default('SYSTEMS') | upper }} • {{ featured.templateContent | readingTime(featured.data.readingTime) }} -
- - -
-{% endif %} diff --git a/src/_includes/partials/footer.njk b/src/_includes/partials/footer.njk deleted file mode 100644 index 6f5a442..0000000 --- a/src/_includes/partials/footer.njk +++ /dev/null @@ -1,13 +0,0 @@ -
- - - -
diff --git a/src/_includes/partials/global-bar.njk b/src/_includes/partials/global-bar.njk deleted file mode 100644 index cfccbf9..0000000 --- a/src/_includes/partials/global-bar.njk +++ /dev/null @@ -1,16 +0,0 @@ -
- - - {{ site.name }} - - - -
diff --git a/src/_includes/partials/hero-tile.njk b/src/_includes/partials/hero-tile.njk deleted file mode 100644 index 7356ca0..0000000 --- a/src/_includes/partials/hero-tile.njk +++ /dev/null @@ -1,24 +0,0 @@ -
-
TECHNICAL PUBLICATION REPOSITORY • ~/NOTES/INDEX.MD
-

{{ heroTitle or site.description }}

-

- {{ heroText or "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation." }} -

- -
- - [All Dispatches ({{ collections.posts.length }})] - - {% for tag in collections.tagList %} - {% set tagCount = 0 %} - {% for post in collections.posts %} - {% if tag in (post.data.tags or []) %} - {% set tagCount = tagCount + 1 %} - {% endif %} - {% endfor %} - - [#{{ tag }}{% if tagCount > 0 %} ({{ tagCount }}){% endif %}] - - {% endfor %} -
-
diff --git a/src/_includes/partials/post-card.njk b/src/_includes/partials/post-card.njk deleted file mode 100644 index 6c9e23b..0000000 --- a/src/_includes/partials/post-card.njk +++ /dev/null @@ -1,27 +0,0 @@ -
-
- - {{ post.templateContent | readingTime(post.data.readingTime) }} -
- -

- {{ post.data.title }} -

- - {% if post.data.excerpt %} -

{{ post.data.excerpt }}

- {% endif %} - -
-
- {% for tag in post.data.tags | filterTagList %} - #{{ tag }} - {% endfor %} -
- {% if post.data.difficulty %} - DIFFICULTY: {{ post.data.difficulty }} - {% endif %} -
-
diff --git a/src/_includes/partials/stats-sidebar.njk b/src/_includes/partials/stats-sidebar.njk deleted file mode 100644 index b2771d0..0000000 --- a/src/_includes/partials/stats-sidebar.njk +++ /dev/null @@ -1,54 +0,0 @@ - diff --git a/src/assets/css/components/article.css b/src/assets/css/components/article.css deleted file mode 100644 index 87cf0cb..0000000 --- a/src/assets/css/components/article.css +++ /dev/null @@ -1,298 +0,0 @@ -/* ========================================================================== - Article Workspace & Markdown Prose (components/article.css) - ========================================================================== */ - -/* Left Sticky Sidebar */ -.article-sidebar { - display: flex; - flex-direction: column; - gap: var(--tile-gap); - position: sticky; - top: 16px; -} - -.sidebar-tile { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius); - padding: 18px; - display: flex; - flex-direction: column; - gap: 12px; -} - -.sidebar-heading { - font-family: var(--font-mono); - font-size: 0.82rem; - font-weight: 700; - color: var(--text-muted); - text-transform: uppercase; - letter-spacing: 0.05em; - border-bottom: var(--border-width) solid var(--border-color); - padding-bottom: 8px; - display: flex; - justify-content: space-between; - align-items: center; -} - -/* Document Table of Contents */ -.toc-nav { - display: flex; - flex-direction: column; - gap: 4px; - font-family: var(--font-mono); - font-size: 0.78rem; -} - -.toc-link { - color: var(--text-muted); - text-decoration: none; - padding: 4px 6px; - border-radius: var(--border-radius-sm); - line-height: 1.4; - display: block; -} - -.toc-link:hover { - background-color: var(--bg-elevated); - color: var(--accent-cyan); -} - -.toc-link.active { - color: var(--accent-cyan); - background-color: var(--bg-canvas); - border-left: 2px solid var(--accent-cyan); - font-weight: 700; -} - -.toc-sub { - padding-left: 16px; - color: var(--text-muted); - font-size: 0.74rem; -} - -/* Main Article Reading Container */ -.article-tile { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius); - padding: 36px 40px; - display: flex; - flex-direction: column; - gap: 24px; -} - -@media (max-width: 600px) { - .article-tile { - padding: 24px 18px; - } -} - -/* Article Header */ -.article-header-block { - border-bottom: var(--border-width) solid var(--border-color); - padding-bottom: 24px; - display: flex; - flex-direction: column; - gap: 12px; -} - -.article-breadcrumbs { - font-family: var(--font-mono); - font-size: 0.78rem; - color: var(--text-muted); - display: flex; - align-items: center; - gap: 8px; -} - -.article-breadcrumbs a { - color: var(--text-muted); - text-decoration: none; -} - -.article-breadcrumbs a:hover { - color: var(--accent-cyan); -} - -.article-main-title { - font-family: var(--font-mono); - font-size: 2.2rem; - font-weight: 700; - color: var(--text-primary); - letter-spacing: -0.02em; - line-height: 1.25; -} - -@media (max-width: 768px) { - .article-main-title { - font-size: 1.7rem; - } -} - -.article-meta-row { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 14px; - font-family: var(--font-mono); - font-size: 0.8rem; - color: var(--text-muted); -} - -.meta-item { - display: flex; - align-items: center; - gap: 6px; -} - -/* Markdown Prose Hierarchy */ -.markdown-prose { - max-width: var(--prose-max-width); - font-size: 1.02rem; - color: var(--text-primary); - line-height: 1.7; -} - -.markdown-prose p { - margin-bottom: 18px; -} - -.markdown-prose h2 { - font-family: var(--font-mono); - font-size: 1.45rem; - font-weight: 700; - color: var(--text-primary); - margin: 36px 0 16px 0; - padding-bottom: 8px; - border-bottom: var(--border-width) solid var(--border-color); - letter-spacing: -0.01em; -} - -.markdown-prose h3 { - font-family: var(--font-mono); - font-size: 1.15rem; - font-weight: 700; - color: var(--text-primary); - margin: 28px 0 12px 0; -} - -.markdown-prose a { - color: var(--accent-cyan); - text-decoration: underline; - text-underline-offset: 3px; -} - -.markdown-prose a:hover { - background-color: var(--accent-cyan); - color: var(--bg-canvas); - text-decoration: none; -} - -/* Inline Code */ -.markdown-prose code:not(pre code) { - font-family: var(--font-code); - font-size: 0.88rem; - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - padding: 2px 6px; - border-radius: var(--border-radius-xs); - color: var(--accent-cyan); -} - -/* Keyboard Shortcut Hints */ -kbd { - font-family: var(--font-mono); - font-size: 0.78rem; - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - padding: 2px 6px; - border-radius: var(--border-radius-xs); - color: var(--text-primary); - box-shadow: none; -} - -/* Markdown Callouts */ -.markdown-callout { - margin: 20px 0; - padding: 14px 18px; - border-radius: var(--border-radius-sm); - border: var(--border-width) solid var(--border-color); - background-color: var(--bg-canvas); - font-size: 0.94rem; - line-height: 1.6; -} - -.callout-note { - border-left: 4px solid var(--accent-cyan); -} - -.callout-warning { - border-left: 4px solid var(--accent-amber); -} - -.callout-title { - font-family: var(--font-mono); - font-weight: 700; - font-size: 0.82rem; - margin-bottom: 6px; - display: flex; - align-items: center; - gap: 6px; -} - -.callout-note .callout-title { - color: var(--accent-cyan); -} - -.callout-warning .callout-title { - color: var(--accent-amber); -} - -/* Monospace Tables */ -.table-container { - width: 100%; - overflow-x: auto; - margin: 22px 0; -} - -.markdown-prose table, -.markdown-table { - width: 100%; - border-collapse: collapse; - font-size: 0.86rem; - font-family: var(--font-mono); - text-align: left; - margin: 20px 0; - border: var(--border-width) solid var(--border-color); -} - -.markdown-prose th, -.markdown-table th { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - padding: 8px 12px; - color: var(--text-muted); - font-weight: 700; -} - -.markdown-prose td, -.markdown-table td { - border: var(--border-width) solid var(--border-color); - padding: 8px 12px; - color: var(--text-primary); -} - -.markdown-prose tr:hover, -.markdown-table tr:hover { - background-color: var(--bg-elevated); -} - -/* Lists */ -.markdown-prose ul, .markdown-prose ol { - margin: 16px 0 18px 24px; -} - -.markdown-prose li { - margin-bottom: 6px; -} diff --git a/src/assets/css/components/cards.css b/src/assets/css/components/cards.css deleted file mode 100644 index 27e36db..0000000 --- a/src/assets/css/components/cards.css +++ /dev/null @@ -1,366 +0,0 @@ -/* ========================================================================== - Cards & Feeds (components/cards.css) - ========================================================================== */ - -/* Featured Lead Article Card (Inside Tile) */ -.featured-card-body { - display: flex; - flex-direction: column; - gap: 12px; -} - -.featured-badge-row { - display: flex; - justify-content: space-between; - align-items: center; - font-family: var(--font-mono); - font-size: 0.76rem; - flex-wrap: wrap; - gap: 8px; -} - -.badge-pinned { - color: var(--accent-amber); - font-weight: 700; -} - -.featured-article-title { - font-family: var(--font-mono); - font-size: 1.35rem; - font-weight: 700; - color: var(--text-primary); - text-decoration: none; - line-height: 1.3; -} - -.featured-article-title:hover { - color: var(--accent-cyan); -} - -.featured-prose { - font-size: 0.92rem; - color: var(--text-primary); - line-height: 1.6; -} - -.featured-cta-row { - display: flex; - justify-content: space-between; - align-items: center; - padding-top: 10px; - border-top: var(--border-width) solid var(--border-color); - flex-wrap: wrap; - gap: 10px; - font-family: var(--font-mono); -} - -.cta-button { - background-color: var(--accent-cyan); - color: var(--bg-canvas); - padding: 6px 14px; - font-weight: 700; - font-size: 0.8rem; - text-decoration: none; - border-radius: var(--border-radius-sm); - border: var(--border-width) solid var(--accent-cyan); - display: inline-block; -} - -.cta-button:hover { - background-color: transparent; - color: var(--accent-cyan); -} - -/* Sidebar Stats / Telemetry Box */ -.sidebar-stats-box { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 12px 14px; - display: flex; - flex-direction: column; - gap: 8px; - font-family: var(--font-mono); - font-size: 0.78rem; - color: var(--text-muted); -} - -.stat-row { - display: flex; - justify-content: space-between; -} - -.stat-val { - color: var(--text-primary); - font-weight: 700; -} - -/* Curated Topic Track Item */ -.topic-track-item { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 10px 12px; - display: flex; - flex-direction: column; - gap: 4px; - text-decoration: none; -} - -.topic-track-item:hover { - border-color: var(--accent-cyan); - background-color: var(--bg-elevated); -} - -.topic-track-title { - font-family: var(--font-mono); - font-size: 0.84rem; - font-weight: 700; - color: var(--text-primary); -} - -.topic-track-item:hover .topic-track-title { - color: var(--accent-cyan); -} - -.topic-track-desc { - font-size: 0.78rem; - color: var(--text-muted); - line-height: 1.4; -} - -/* Full-Width Chronological Article Feed */ -.feed-list { - display: flex; - flex-direction: column; - gap: 12px; -} - -.feed-card { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 16px 18px; - display: flex; - flex-direction: column; - gap: 8px; - text-decoration: none; -} - -.feed-card:hover { - border-color: var(--accent-cyan); - background-color: var(--bg-elevated); -} - -.feed-meta-row { - display: flex; - justify-content: space-between; - align-items: center; - font-family: var(--font-mono); - font-size: 0.76rem; - color: var(--text-muted); -} - -.feed-date { - color: var(--accent-cyan); -} - -.feed-heading { - font-family: var(--font-mono); - font-size: 1.1rem; - font-weight: 700; - color: var(--text-primary); - text-decoration: none; - line-height: 1.35; -} - -.feed-card:hover .feed-heading { - color: var(--accent-cyan); -} - -.feed-excerpt { - font-size: 0.9rem; - color: var(--text-primary); - line-height: 1.6; -} - -.feed-tags-row { - display: flex; - justify-content: space-between; - align-items: center; - padding-top: 6px; - border-top: var(--border-width) solid var(--border-color); - font-family: var(--font-mono); - font-size: 0.74rem; - color: var(--text-muted); - flex-wrap: wrap; - gap: 6px; -} - -.tag-cluster { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.tag-chip { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - padding: 2px 6px; - border-radius: var(--border-radius-sm); - color: var(--text-muted); - text-decoration: none; - font-family: var(--font-mono); - font-size: 0.74rem; -} - -.tag-chip:hover { - border-color: var(--accent-cyan); - color: var(--accent-cyan); -} - -/* Featured Service Card (Homelab Gateway) */ -.blog-service-feature { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 16px; - display: flex; - flex-direction: column; - gap: 10px; -} - -.blog-feature-top { - display: flex; - justify-content: space-between; - align-items: center; - font-family: var(--font-mono); - font-size: 0.78rem; -} - -.badge-core { - background-color: var(--accent-cyan); - color: var(--bg-canvas); - padding: 2px 6px; - font-weight: 700; - border-radius: var(--border-radius-sm); -} - -.blog-feature-title { - font-family: var(--font-mono); - font-size: 1.15rem; - font-weight: 700; - color: var(--text-primary); - text-decoration: none; - display: inline-block; -} - -.blog-feature-title:hover { - color: var(--accent-cyan); -} - -.blog-feature-desc { - font-size: 0.9rem; - color: var(--text-primary); - line-height: 1.5; -} - -.blog-sublinks { - display: flex; - flex-direction: column; - gap: 6px; - margin-top: 4px; - border-top: var(--border-width) solid var(--border-color); - padding-top: 10px; -} - -.blog-sublink-item { - display: flex; - justify-content: space-between; - font-family: var(--font-mono); - font-size: 0.8rem; - color: var(--text-primary); - text-decoration: none; - padding: 4px 6px; - border-radius: var(--border-radius-sm); -} - -.blog-sublink-item:hover { - background-color: var(--bg-elevated); - color: var(--accent-cyan); -} - -/* Homelab Services Mini-Grid */ -.services-mini-grid { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 10px; -} - -@media (max-width: 540px) { - .services-mini-grid { - grid-template-columns: 1fr; - } -} - -.service-tile-item { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 12px; - text-decoration: none; - display: flex; - flex-direction: column; - justify-content: space-between; - gap: 6px; -} - -.service-tile-item:hover { - border-color: var(--accent-cyan); - background-color: var(--bg-elevated); -} - -.service-item-title { - font-family: var(--font-mono); - font-size: 0.88rem; - font-weight: 700; - color: var(--text-primary); -} - -.service-tile-item:hover .service-item-title { - color: var(--accent-cyan); -} - -.service-item-tag { - font-family: var(--font-mono); - font-size: 0.7rem; - color: var(--text-muted); -} - -.service-item-desc { - font-size: 0.8rem; - color: var(--text-muted); - line-height: 1.4; -} - -/* Infrastructure Node Telemetry */ -.node-stat-row { - display: flex; - justify-content: space-between; - align-items: center; - padding: 8px 10px; - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - font-family: var(--font-mono); - font-size: 0.78rem; -} - -.node-name { - color: var(--text-primary); - font-weight: 700; -} - -.node-load { - color: var(--accent-green); -} diff --git a/src/assets/css/components/code-box.css b/src/assets/css/components/code-box.css deleted file mode 100644 index 11599ec..0000000 --- a/src/assets/css/components/code-box.css +++ /dev/null @@ -1,123 +0,0 @@ -/* ========================================================================== - Terminal Code Blocks & Syntax Highlighting (components/code-box.css) - ========================================================================== */ - -/* Terminal Code Box Component */ -.terminal-code-box, -.code-block-container { - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - background-color: var(--bg-canvas); - overflow: hidden; - font-family: var(--font-code); - margin: 18px 0; -} - -.code-titlebar, -.code-block-header { - background-color: var(--bg-surface); - border-bottom: var(--border-width) solid var(--border-color); - padding: 6px 14px; - font-size: 0.74rem; - font-family: var(--font-mono); - color: var(--text-muted); - display: flex; - justify-content: space-between; - align-items: center; -} - -.code-title { - display: flex; - align-items: center; - gap: 8px; - color: var(--text-primary); - font-weight: 500; -} - -.copy-code-btn { - background: transparent; - border: var(--border-width) solid var(--border-color); - color: var(--text-muted); - padding: 2px 8px; - font-family: inherit; - font-size: 0.72rem; - cursor: pointer; - border-radius: var(--border-radius-sm); -} - -.copy-code-btn:hover { - border-color: var(--accent-cyan); - color: var(--accent-cyan); -} - -.code-content, -.code-block-container pre, -.markdown-prose pre { - padding: 14px 16px; - font-size: 0.82rem; - overflow-x: auto; - color: var(--text-primary); - line-height: 1.55; - margin: 18px 0; - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - font-family: var(--font-code); -} - -/* Syntax Highlighting Tokens (Prism / 11ty Syntax Highlight) */ -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #5c6370; - font-style: italic; -} - -.token.punctuation { - color: #abb2bf; -} - -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: var(--accent-amber); -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: var(--accent-green); -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: var(--accent-cyan); -} - -.token.atrule, -.token.attr-value, -.token.keyword { - color: #c678dd; -} - -.token.function, -.token.class-name { - color: #61afef; -} - -.token.regex, -.token.important, -.token.variable { - color: var(--accent-amber); -} diff --git a/src/assets/css/components/footer.css b/src/assets/css/components/footer.css deleted file mode 100644 index 642c063..0000000 --- a/src/assets/css/components/footer.css +++ /dev/null @@ -1,39 +0,0 @@ -/* ========================================================================== - Footer Tile (components/footer.css) - ========================================================================== */ - -.footer-tile { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius); - padding: 14px 20px; - display: flex; - justify-content: space-between; - align-items: center; - font-family: var(--font-mono); - font-size: 0.74rem; - color: var(--text-muted); - flex-wrap: wrap; - gap: 12px; -} - -.footer-left { - display: flex; - align-items: center; - gap: 12px; -} - -.footer-right { - display: flex; - gap: 16px; - align-items: center; -} - -.footer-link { - color: var(--text-muted); - text-decoration: none; -} - -.footer-link:hover { - color: var(--accent-cyan); -} diff --git a/src/assets/css/components/global-bar.css b/src/assets/css/components/global-bar.css deleted file mode 100644 index c15b51f..0000000 --- a/src/assets/css/components/global-bar.css +++ /dev/null @@ -1,63 +0,0 @@ -/* ========================================================================== - Global Status Header Bar (components/global-bar.css) - ========================================================================== */ - -.global-bar { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius); - padding: 10px 18px; - display: flex; - justify-content: space-between; - align-items: center; - font-family: var(--font-mono); - font-size: 0.8rem; - flex-wrap: wrap; - gap: 10px; -} - -.brand-group { - display: flex; - align-items: center; - gap: 10px; - color: var(--text-primary); - font-weight: 700; - text-decoration: none; -} - -.brand-group:hover { - color: var(--accent-cyan); -} - -.status-indicator { - width: 8px; - height: 8px; - background-color: var(--accent-green); - display: inline-block; -} - -.bar-nav { - display: flex; - gap: 14px; - align-items: center; -} - -.bar-link { - color: var(--text-muted); - text-decoration: none; -} - -.bar-link:hover { - color: var(--accent-cyan); -} - -.bar-link.active { - color: var(--text-primary); - border-bottom: 1px solid var(--accent-cyan); -} - -.bar-link.external::after { - content: " ↗"; - font-size: 0.75em; - color: var(--text-muted); -} diff --git a/src/assets/css/components/tiles.css b/src/assets/css/components/tiles.css deleted file mode 100644 index 84e0fda..0000000 --- a/src/assets/css/components/tiles.css +++ /dev/null @@ -1,140 +0,0 @@ -/* ========================================================================== - Tile Containers & Hero Tile (components/tiles.css) - ========================================================================== */ - -/* Standard Tile Container */ -.tile { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius); - padding: 20px; - display: flex; - flex-direction: column; - gap: 14px; -} - -.tile-header { - display: flex; - justify-content: space-between; - align-items: baseline; - border-bottom: var(--border-width) solid var(--border-color); - padding-bottom: 10px; - flex-wrap: wrap; - gap: 8px; -} - -.tile-title { - font-family: var(--font-mono); - font-size: 0.92rem; - font-weight: 700; - color: var(--text-primary); - display: flex; - align-items: center; - gap: 8px; -} - -.tile-meta { - font-family: var(--font-mono); - font-size: 0.74rem; - color: var(--text-muted); -} - -.tile-content { - display: flex; - flex-direction: column; - gap: 12px; -} - -/* Hero Lander Tile */ -.hero-tile { - background-color: var(--bg-surface); - border: var(--border-width) solid var(--border-color); - border-left: 3px solid var(--accent-cyan); - border-radius: var(--border-radius); - padding: 24px 28px; - display: flex; - flex-direction: column; - gap: 12px; -} - -.hero-pretitle { - font-family: var(--font-mono); - font-size: 0.8rem; - color: var(--accent-cyan); - letter-spacing: 0.06em; - text-transform: uppercase; -} - -.hero-main-title { - font-family: var(--font-mono); - font-size: 2.1rem; - font-weight: 700; - color: var(--text-primary); - letter-spacing: -0.02em; - line-height: 1.2; -} - -@media (max-width: 600px) { - .hero-main-title { - font-size: 1.6rem; - } -} - -.hero-landing-text { - font-size: 0.98rem; - color: var(--text-primary); - line-height: 1.65; - max-width: 82ch; -} - -/* Filter Pills Row in Hero Tile */ -.filter-pills-row { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 8px; - margin-top: 4px; - font-family: var(--font-mono); - font-size: 0.78rem; -} - -.filter-tag-btn { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - color: var(--text-muted); - padding: 3px 8px; - border-radius: var(--border-radius-sm); - cursor: pointer; - text-decoration: none; - display: inline-flex; - align-items: center; -} - -.filter-tag-btn:hover { - border-color: var(--accent-cyan); - color: var(--text-primary); - background-color: var(--bg-elevated); -} - -.filter-tag-btn.active { - background-color: var(--accent-cyan); - color: var(--bg-canvas); - border-color: var(--accent-cyan); - font-weight: 700; -} - -/* Directive Callout Box inside Hero */ -.hero-directive-box { - background-color: var(--bg-canvas); - border: var(--border-width) solid var(--border-color); - border-radius: var(--border-radius-sm); - padding: 12px 16px; - font-family: var(--font-mono); - font-size: 0.82rem; - color: var(--text-muted); - line-height: 1.6; -} - -.hero-directive-box strong { - color: var(--text-primary); -} diff --git a/src/assets/css/layout.css b/src/assets/css/layout.css deleted file mode 100644 index 95f6ad4..0000000 --- a/src/assets/css/layout.css +++ /dev/null @@ -1,53 +0,0 @@ -/* ========================================================================== - Tiling Window Manager Grids & Layout (layout.css) - ========================================================================== */ - -/* Outer Shell Container */ -.tiling-layout { - width: 100%; - max-width: var(--site-max-width); - display: flex; - flex-direction: column; - gap: var(--tile-gap); -} - -/* Asymmetric 2-Column Split Grid (Lander: Lead Article + Telemetry Sidebar) */ -.split-grid { - display: grid; - grid-template-columns: 1.25fr 0.75fr; - gap: var(--tile-gap); - align-items: start; -} - -@media (max-width: 880px) { - .split-grid { - grid-template-columns: 1fr; - } -} - -/* Article Workspace Grid (Left Sidebar TOC + Main Reading Workspace) */ -.article-workspace-grid { - display: grid; - grid-template-columns: 290px 1fr; - gap: var(--tile-gap); - align-items: start; -} - -@media (max-width: 960px) { - .article-workspace-grid { - grid-template-columns: 1fr; - } -} - -/* Generic Symmetrical Grids */ -.grid-2col { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: var(--tile-gap); -} - -@media (max-width: 768px) { - .grid-2col { - grid-template-columns: 1fr; - } -} diff --git a/src/assets/css/main.css b/src/assets/css/main.css deleted file mode 100644 index cc44511..0000000 --- a/src/assets/css/main.css +++ /dev/null @@ -1,21 +0,0 @@ -/* ========================================================================== - Main Stylesheet (main.css) - River Rooks Blog - Modular CSS Architecture - ========================================================================== */ - -/* 1. Design Tokens & CSS Custom Properties */ -@import "./tokens.css"; - -/* 2. Global Reset & Baseline Typography */ -@import "./reset.css"; - -/* 3. Tiling Window Manager Grids */ -@import "./layout.css"; - -/* 4. Component Styles */ -@import "./components/global-bar.css"; -@import "./components/tiles.css"; -@import "./components/cards.css"; -@import "./components/code-box.css"; -@import "./components/article.css"; -@import "./components/footer.css"; diff --git a/src/assets/css/reset.css b/src/assets/css/reset.css deleted file mode 100644 index 0aeaf62..0000000 --- a/src/assets/css/reset.css +++ /dev/null @@ -1,52 +0,0 @@ -/* ========================================================================== - CSS Reset & Baseline (reset.css) - Strict adherence to developer-centric minimalism & instant transitions - ========================================================================== */ - -*, *::before, *::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -html { - font-size: 16px; - -webkit-text-size-adjust: 100%; - text-rendering: optimizeLegibility; - scroll-behavior: smooth; -} - -body { - background-color: var(--bg-canvas); - color: var(--text-primary); - font-family: var(--font-prose); - line-height: 1.6; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - padding: 24px 16px 48px 16px; - overflow-x: hidden; -} - -/* Hard anti-pattern enforcement: instant transitions across UI elements */ -a, button, input, select, textarea { - transition: none !important; -} - -/* High-contrast keyboard accessibility outline */ -:focus-visible { - outline: 2px solid var(--accent-cyan); - outline-offset: 2px; -} - -img, svg, video { - max-width: 100%; - height: auto; - display: block; -} - -/* Monospace font assignment for code & structural elements */ -code, pre, kbd, samp { - font-family: var(--font-code); -} diff --git a/src/assets/css/tokens.css b/src/assets/css/tokens.css deleted file mode 100644 index ebc7aa5..0000000 --- a/src/assets/css/tokens.css +++ /dev/null @@ -1,38 +0,0 @@ -/* ========================================================================== - Design Tokens (tokens.css) - River Rooks Blog - Native Dark Mode Architecture - ========================================================================== */ - -:root { - /* Surface & Canvas Colors */ - --bg-canvas: #0d0f12; /* Deep slate/charcoal canvas */ - --bg-surface: #121417; /* Tile & card surface */ - --bg-elevated: #1c1f26; /* Hovered surface */ - - /* Borders & Dividers */ - --border-color: #2b303b; /* Crisp 1px border */ - --border-width: 1px; - --border-radius: 4px; /* Strictly capped at 4px */ - --border-radius-sm: 2px; - --border-radius-xs: 1px; - - /* Typography */ - --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace; - --font-code: 'JetBrains Mono', 'Fira Code', monospace; - --font-prose: 'Inter', system-ui, -apple-system, sans-serif; - - /* Text Colors */ - --text-primary: #e0e6f0; /* Light off-white prose */ - --text-muted: #8a95a5; /* Monospace metadata */ - - /* High-Signal Terminal Accents */ - --accent-cyan: #00f0ff; /* Primary active accent */ - --accent-green: #00e676; /* Success / online indicator */ - --accent-amber: #ffb700; /* Warning / highlight accent */ - --accent-red: #ff5252; /* Danger / caution accent */ - - /* Structural Dimensions */ - --site-max-width: 1140px; - --tile-gap: 16px; - --prose-max-width: 68ch; -} diff --git a/src/dispatches.njk b/src/dispatches.njk deleted file mode 100644 index 9eb3959..0000000 --- a/src/dispatches.njk +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: layouts/base.njk -title: "River Rooks | Engineering Notes & Systems Architecture" ---- - - -{% include "partials/hero-tile.njk" %} - - -
-
- {% include "partials/featured-card.njk" %} -
- -
- {% include "partials/stats-sidebar.njk" %} -
-
- - -
-
-
- - RECENT DISPATCHES -
- ORDER: CHRONOLOGICAL DESC • TOTAL: {{ collections.posts.length }} -
- -
- {% for post in collections.posts %} - {% include "partials/post-card.njk" %} - {% else %} -

- No published dispatches found in repository. -

- {% endfor %} -
-
diff --git a/src/index.njk b/src/index.njk deleted file mode 100644 index 3a7ea2f..0000000 --- a/src/index.njk +++ /dev/null @@ -1,115 +0,0 @@ ---- -layout: layouts/base.njk -title: "River Rooks | Homelab Gateway" ---- - - -
-
SYSTEM DECLARATION • NODE GATEWAY
-

Engineering Sovereign Infrastructure & Technical Notes

- -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. -

-

- Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. -

-
- -
- PRIMARY DESTINATIONS: - [1] Technical Blog ({{ collections.posts.length }} Articles) • - [2] Gitea Repos • - [3] Public Tools • - [4] Cluster Telemetry -
-
- - -
- -
-
-
-
- - // PRIMARY SERVICE: THE TECHNICAL BLOG -
- ~/notes/ • {{ collections.posts.length }} ARTICLES -
- -
-
- [CORE PUBLICATION SERVICE] - {{ collections.posts[0].date | postDate }} LAST SYNC -
- - > Technical Notes & Engineering Dispatches -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. -

- - -
-
-
- - -
-
-
-
- - // HOMELAB SERVICES ROUTER -
- {{ site.services.length }} PUBLIC TOOLS -
- -
- {% for svc in site.services %} - -
-
{{ svc.name }}
-
{{ svc.tag }}
-
-

{{ svc.desc }}

-
- {% endfor %} -
-
- - -
-
-
- - // CLUSTER TELEMETRY -
- 3 NODES ONLINE -
- -
-
- NODE-01 (Primary Cluster) - ONLINE • LOAD: 0.18 -
-
- NODE-02 (Storage Array) - ONLINE • POOL: 98% HEALTH -
-
- GATEWAY-01 (Edge Ingress) - ONLINE • ROUTING ACTIVE -
-
-
-
-
diff --git a/src/posts/2026-07-15-infrastructure-notes-template.md b/src/posts/2026-07-15-infrastructure-notes-template.md deleted file mode 100644 index 434f34c..0000000 --- a/src/posts/2026-07-15-infrastructure-notes-template.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -layout: layouts/post.njk -title: "Infrastructure Notes & Systems Deployment Guide" -date: 2026-07-15 -tags: - - homelab - - networking - - templates -excerpt: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident." -readingTime: "4 MIN READ" -featured: false -difficulty: "BEGINNER" ---- - -## 1.0 Topology Overview - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua: - -```text -[Gateway Ingress] - | - [Edge Router] - | - +-----+-----+ - | | -[Node 01] [Node 02] -``` - -## 2.0 Deployment Configuration - -Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat: - -```yaml -version: '3.8' - -services: - app: - image: service:latest - restart: unless-stopped - ports: - - "8080:80" -``` - -## 3.0 Verification Testing - -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur: - -```sh -curl -s http://localhost:8080/health -``` - -Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/src/posts/2026-07-20-sample-technical-dispatch.md b/src/posts/2026-07-20-sample-technical-dispatch.md deleted file mode 100644 index ee47b48..0000000 --- a/src/posts/2026-07-20-sample-technical-dispatch.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -layout: layouts/post.njk -title: "Sample Technical Dispatch: Systems Architecture & Implementation" -date: 2026-07-20 -tags: - - systems - - architecture - - templates -excerpt: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam." -readingTime: "6 MIN READ" -featured: true -difficulty: "INTERMEDIATE" ---- - -## 1.0 Executive Summary - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. - -Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. - -
-
[!NOTE] Operational Directives
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam.

-
- -## 2.0 System Parameters & Specifications - -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante. Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis: - -### 2.1 Interface Configuration Matrix - -| Parameter ID | Signal Name | Protocol Bus | Expected Value | -| :--- | :--- | :--- | :--- | -| **0x01** | `SYS_CLOCK` | SPI Primary | 100 MHz | -| **0x02** | `DATA_IN` | Serial Bus | Bidirectional | -| **0x03** | `CONTROL_REG` | I2C Header | 0x3F Active | -| **0x04** | `GROUND_REF` | Chassis GND | 0.0V Nominal | - -
-
[!WARNING] Configuration Voltage Boundary
-

Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.

-
- -## 3.0 Execution Workflow - -Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta: - -```sh -#!/bin/sh -# Sample deployment and verification routine -set -eu - -echo "[+] Initializing subsystem..." -check_environment() { - test -f /etc/config.json && echo "Config verified." -} - -check_environment -``` - -Press Ctrl + C to interrupt operations safely at any point. - -## 4.0 Telemetry & Verification - -Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla: - -- **Metric A:** `1,048,576 ops/sec` -- **Metric B:** `SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` -- **Latency:** `< 2.5ms` nominal - -## 5.0 Audit Checklist - -Lorem ipsum dolor sit amet, consectetur adipiscing elit: - -- [x] Baseline architectural parameters verified -- [x] Initial configuration and unit tests passed -- [x] System telemetry within expected boundaries -- [ ] Production deployment and final review diff --git a/test/build-integrity.test.js b/test/build-integrity.test.js deleted file mode 100644 index 4bdd6d2..0000000 --- a/test/build-integrity.test.js +++ /dev/null @@ -1,86 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; -import { execSync } from "node:child_process"; - -const siteDir = path.resolve("_site"); - -function getAllHtmlFiles(dir) { - let results = []; - const list = fs.readdirSync(dir); - for (const file of list) { - const filePath = path.join(dir, file); - const stat = fs.statSync(filePath); - if (stat && stat.isDirectory()) { - results = results.concat(getAllHtmlFiles(filePath)); - } else if (file.endsWith(".html")) { - results.push(filePath); - } - } - return results; -} - -test("Build & Link Integrity: Output inspection and link verification", () => { - // Ensure fresh build exists - if (!fs.existsSync(path.join(siteDir, "index.html"))) { - execSync("npm run build", { - stdio: "pipe", - env: { ...process.env, SITE_DOMAIN: process.env.SITE_DOMAIN || "riverrooks.dev" } - }); - } - - // 1. Core Pages Exist - assert.ok(fs.existsSync(path.join(siteDir, "index.html")), "Root _site/index.html must exist"); - assert.ok(fs.existsSync(path.join(siteDir, "dispatches/index.html")), "_site/dispatches/index.html must exist"); - assert.ok(fs.existsSync(path.join(siteDir, "assets/css/main.css")), "_site/assets/css/main.css must exist"); - - const htmlFiles = getAllHtmlFiles(siteDir); - assert.ok(htmlFiles.length >= 4, "Must compile all core pages and articles"); - - for (const htmlFile of htmlFiles) { - const relHtml = path.relative(siteDir, htmlFile); - const content = fs.readFileSync(htmlFile, "utf-8"); - - // 2. HTML Boilerplate Invariants - assert.match(content, //i, `${relHtml} must contain `); - assert.match(content, //i, `${relHtml} must link to main.css`); - - // 3. Internal Link Integrity (No 404s!) - const internalLinks = [...content.matchAll(/href="(\/[^"#?]*)"/g)].map((m) => m[1]); - for (const link of internalLinks) { - if (link.startsWith("/feed.xml")) continue; // dynamic RSS route - // Normalize link to file on disk: /dispatches/ -> _site/dispatches/index.html or _site/dispatches.html - let targetPath; - if (link.endsWith("/")) { - targetPath = path.join(siteDir, link, "index.html"); - } else if (path.extname(link)) { - targetPath = path.join(siteDir, link); - } else { - targetPath = path.join(siteDir, `${link}.html`); - if (!fs.existsSync(targetPath)) { - targetPath = path.join(siteDir, link, "index.html"); - } - } - - assert.ok( - fs.existsSync(targetPath), - `Broken internal link in ${relHtml}: href="${link}" resolves to missing file: ${targetPath}` - ); - } - - // 4. Anchor Link Integrity (TOC anchor links match actual heading IDs) - const anchorLinks = [...content.matchAll(/href="#([^"]+)"/g)].map((m) => m[1]); - for (const anchor of anchorLinks) { - // Ignore skip-to-content or standard body anchors - if (anchor === "main-content") continue; - const expectedIdRegex = new RegExp(`id="${anchor}"`, "i"); - assert.match( - content, - expectedIdRegex, - `Broken TOC anchor link in ${relHtml}: href="#${anchor}" has no corresponding id="${anchor}"` - ); - } - } -}); diff --git a/test/design-rules.test.js b/test/design-rules.test.js deleted file mode 100644 index eac00bf..0000000 --- a/test/design-rules.test.js +++ /dev/null @@ -1,86 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; - -const cssDir = path.resolve("src/assets/css"); - -function getAllCssFiles(dir) { - let results = []; - const list = fs.readdirSync(dir); - for (const file of list) { - const filePath = path.join(dir, file); - const stat = fs.statSync(filePath); - if (stat && stat.isDirectory()) { - results = results.concat(getAllCssFiles(filePath)); - } else if (file.endsWith(".css")) { - results.push(filePath); - } - } - return results; -} - -test("Design Specification: Strict Anti-Pattern Regression Testing", () => { - const cssFiles = getAllCssFiles(cssDir); - assert.ok(cssFiles.length >= 5, "Must inspect all modular CSS files"); - - for (const file of cssFiles) { - const relPath = path.relative(process.cwd(), file); - const content = fs.readFileSync(file, "utf-8"); - - // 1. Anti-Pattern: NO Glassmorphism (backdrop-filter) - assert.doesNotMatch( - content, - /backdrop-filter\s*:/i, - `Violation in ${relPath}: Glassmorphism (backdrop-filter) is strictly forbidden` - ); - - // 2. Anti-Pattern: NO Drop Shadows or Glows (box-shadow, text-shadow) - // Allowed: box-shadow: none; or text-shadow: none; - const shadowMatches = content.match(/(box-shadow|text-shadow)\s*:\s*([^;]+);/gi) || []; - for (const match of shadowMatches) { - assert.match( - match, - /(box-shadow|text-shadow)\s*:\s*none\s*;/i, - `Violation in ${relPath}: Drop shadows and glows are forbidden (found: '${match}')` - ); - } - - // 3. Anti-Pattern: NO Gradients (linear, radial, conic) - assert.doesNotMatch( - content, - /(linear-gradient|radial-gradient|conic-gradient)/i, - `Violation in ${relPath}: Gradients are strictly forbidden` - ); - - // 4. Anti-Pattern: NO Rounded Bubbles (border-radius capped at 4px max) - const radiusMatches = content.match(/border-radius\s*:\s*([^;]+);/gi) || []; - for (const match of radiusMatches) { - // Check for pixel values > 4px (e.g. 5px, 6px, 8px, 12px, 20px) - const pxMatch = match.match(/(\d+)\s*px/i); - if (pxMatch) { - const px = parseInt(pxMatch[1], 10); - assert.ok( - px <= 4, - `Violation in ${relPath}: Border radius must be 0px to 4px max, found: ${px}px in '${match}'` - ); - } - // Check for percentages (e.g. 50%) - assert.doesNotMatch( - match, - /\d+%/, - `Violation in ${relPath}: Rounded pill/circular percentages forbidden in '${match}'` - ); - } - - // 5. Anti-Pattern: NO Float/Spring Transitions (Must be instant snaps) - const transitionMatches = content.match(/transition\s*:\s*([^;]+);/gi) || []; - for (const match of transitionMatches) { - assert.match( - match, - /transition\s*:\s*(none(\s*!important)?|0s\s*);/i, - `Violation in ${relPath}: Transitions must be instant (none or 0s), found: '${match}'` - ); - } - } -}); diff --git a/test/docker-config.test.js b/test/docker-config.test.js deleted file mode 100644 index 167bcb0..0000000 --- a/test/docker-config.test.js +++ /dev/null @@ -1,41 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; - -test("Docker Configuration: Dockerfile enforces Node runtime and excludes Nginx", () => { - const dockerfilePath = path.resolve(process.cwd(), "Dockerfile"); - assert.ok(fs.existsSync(dockerfilePath), "Dockerfile must exist"); - - const content = fs.readFileSync(dockerfilePath, "utf-8"); - - // Must use Node 22 alpine - assert.match(content, /FROM\s+node:22-alpine/i, "Dockerfile must use node:22-alpine base image"); - - // Must NOT contain nginx base images or references - assert.doesNotMatch(content, /FROM\s+nginx/i, "Dockerfile must not use nginx base image"); - assert.doesNotMatch(content, /nginx/i, "Dockerfile must not contain nginx directives"); - - // Must build static site and serve with npm - assert.match(content, /RUN\s+npm\s+run\s+build/, "Dockerfile must run npm build"); - assert.match(content, /ARG\s+PORT=8080/, "Dockerfile must define ARG PORT with default fallback"); - assert.match(content, /ENV\s+PORT=\$\{?PORT\}?/, "Dockerfile must define ENV PORT using variable"); - assert.match(content, /EXPOSE\s+\$\{?PORT\}?/, "Dockerfile must expose dynamic PORT variable"); - assert.match(content, /CMD\s*\[\s*["']npm["']\s*,\s*["']start["']\s*\]/, "Dockerfile must start via npm start"); -}); - -test("Docker Configuration: docker-compose configures Node service correctly", () => { - const composePath = fs.existsSync(path.resolve(process.cwd(), "sample-docker-compose.yml")) - ? path.resolve(process.cwd(), "sample-docker-compose.yml") - : path.resolve(process.cwd(), "docker-compose.yml"); - assert.ok(fs.existsSync(composePath), "Compose template file must exist"); - - const content = fs.readFileSync(composePath, "utf-8"); - - // Verifies dynamic port mapping and environment variables - assert.match(content, /PORT:\s*"?\$\{PORT:-8080\}"?/, "docker-compose.yml must pass dynamic PORT build arg and env"); - assert.match(content, /:\$\{PORT:-8080\}/, "docker-compose.yml must map dynamic container PORT"); - - // Verifies domain argument enforcement - assert.match(content, /SITE_DOMAIN/, "docker-compose.yml must require SITE_DOMAIN"); -}); diff --git a/test/filters.test.js b/test/filters.test.js deleted file mode 100644 index 8e2c7f8..0000000 --- a/test/filters.test.js +++ /dev/null @@ -1,107 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import { - postDate, - isoDate, - limit, - filterTagList, - readingTime, - extractHeadings -} from "../src/_filters/index.js"; - -test("Filters - postDate: formats valid dates", () => { - assert.equal(postDate("2026-07-20"), "JUL 20, 2026"); - assert.equal(postDate(new Date("2026-12-31T00:00:00Z")), "DEC 31, 2026"); -}); - -test("Filters - postDate: handles adversarial / invalid inputs gracefully", () => { - assert.equal(postDate(null), ""); - assert.equal(postDate(undefined), ""); - assert.equal(postDate("invalid-date-string"), ""); - assert.equal(postDate(""), ""); -}); - -test("Filters - isoDate: formats ISO strings", () => { - assert.equal(isoDate("2026-07-20"), "2026-07-20"); - assert.equal(isoDate(new Date("2026-05-15T00:00:00Z")), "2026-05-15"); -}); - -test("Filters - isoDate: handles adversarial / invalid inputs gracefully", () => { - assert.equal(isoDate(null), ""); - assert.equal(isoDate(undefined), ""); - assert.equal(isoDate("not-a-date"), ""); -}); - -test("Filters - limit: slices arrays correctly", () => { - assert.deepEqual(limit([1, 2, 3, 4, 5], 3), [1, 2, 3]); - assert.deepEqual(limit([1, 2], 5), [1, 2]); -}); - -test("Filters - limit: handles adversarial inputs (negative, 0, non-array)", () => { - assert.deepEqual(limit([1, 2, 3], 0), []); - assert.deepEqual(limit([1, 2, 3], -5), []); - assert.deepEqual(limit(null, 3), []); - assert.deepEqual(limit("not-an-array", 3), []); -}); - -test("Filters - filterTagList: removes internal system tags", () => { - const input = ["firmware", "posts", "security", "all", "nav", "post"]; - assert.deepEqual(filterTagList(input), ["firmware", "security"]); -}); - -test("Filters - filterTagList: handles adversarial inputs (# prefix, casing, non-string)", () => { - const input = ["#firmware", "#POSTS", "ALL", "#homelab", 42, null, undefined]; - assert.deepEqual(filterTagList(input), ["#firmware", "#homelab"]); - assert.deepEqual(filterTagList(null), []); - assert.deepEqual(filterTagList(undefined), []); -}); - -test("Filters - readingTime: calculates reading time from word count", () => { - // 199 words -> 1 min - const shortText = "word ".repeat(199); - assert.equal(readingTime(shortText), "1 MIN READ"); - - // 201 words -> 2 min - const mediumText = "word ".repeat(201); - assert.equal(readingTime(mediumText), "2 MIN READ"); - - // 1000 words -> 5 min - const longText = "word ".repeat(1000); - assert.equal(readingTime(longText), "5 MIN READ"); -}); - -test("Filters - readingTime: respects explicit frontmatter override", () => { - assert.equal(readingTime("any text", "15 MIN READ"), "15 MIN READ"); -}); - -test("Filters - readingTime: handles adversarial HTML tags without inflating word count", () => { - // HTML tags should be stripped before counting words - const htmlText = "
word

another

"; - assert.equal(readingTime(htmlText), "1 MIN READ"); - assert.equal(readingTime(""), "1 MIN READ"); - assert.equal(readingTime(null), "1 MIN READ"); -}); - -test("Filters - extractHeadings: extracts H2 and H3 with IDs and titles", () => { - const html = ` -

Title To Ignore

-

1.0 First Section

-

Some text

-

1.1 Sub Section

-

Ignore H4

-

2.0 Second Section with code and span

- `; - - const headings = extractHeadings(html); - assert.equal(headings.length, 3); - assert.deepEqual(headings[0], { level: 2, id: "section-1", title: "1.0 First Section" }); - assert.deepEqual(headings[1], { level: 3, id: "sub-1", title: "1.1 Sub Section" }); - assert.deepEqual(headings[2], { level: 2, id: "section-2", title: "2.0 Second Section with code and span" }); -}); - -test("Filters - extractHeadings: handles adversarial HTML inputs gracefully", () => { - assert.deepEqual(extractHeadings(""), []); - assert.deepEqual(extractHeadings(null), []); - assert.deepEqual(extractHeadings(undefined), []); - assert.deepEqual(extractHeadings("

No headings here

"), []); -}); diff --git a/test/frontmatter-schema.test.js b/test/frontmatter-schema.test.js deleted file mode 100644 index cfd8504..0000000 --- a/test/frontmatter-schema.test.js +++ /dev/null @@ -1,71 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; - -const postsDir = path.resolve("src/posts"); - -test("Content Contract: All posts in src/posts/ satisfy frontmatter schema", () => { - assert.ok(fs.existsSync(postsDir), "src/posts directory must exist"); - const postFiles = fs.readdirSync(postsDir).filter((f) => f.endsWith(".md")); - - assert.ok(postFiles.length > 0, "There must be at least one published post"); - - for (const file of postFiles) { - const filePath = path.join(postsDir, file); - const content = fs.readFileSync(filePath, "utf-8"); - - // 1. Filename Convention: YYYY-MM-DD-slug.md - assert.match( - file, - /^\d{4}-\d{2}-\d{2}-[a-z0-9-]+\.md$/, - `Post filename '${file}' must follow 'YYYY-MM-DD-slug.md' naming standard` - ); - - // 2. YAML Frontmatter Boundary check - assert.match( - content, - /^---\n([\s\S]*?)\n---/, - `Post '${file}' must start with valid YAML frontmatter delimiters` - ); - - // Extract frontmatter block - const fmMatch = content.match(/^---\n([\s\S]*?)\n---/); - const fmText = fmMatch[1]; - - // 3. Title Invariant - assert.match( - fmText, - /title:\s*"[^"]{5,}"/, - `Post '${file}' must contain a valid title of at least 5 characters` - ); - - // 4. Date Invariant (ISO Format) - assert.match( - fmText, - /date:\s*\d{4}-\d{2}-\d{2}/, - `Post '${file}' must define an ISO date (YYYY-MM-DD)` - ); - - // 5. Layout Invariant - assert.match( - fmText, - /layout:\s*layouts\/post\.njk/, - `Post '${file}' must specify 'layout: layouts/post.njk'` - ); - - // 6. Tags Invariant - assert.match( - fmText, - /tags:\s*\n(\s+-\s+[a-z0-9-]+\n)+/, - `Post '${file}' must specify a non-empty YAML tags list` - ); - - // 7. Excerpt Invariant - assert.match( - fmText, - /excerpt:\s*"[^"]{20,}"/, - `Post '${file}' must provide a substantive excerpt of at least 20 characters` - ); - } -}); diff --git a/test/healthcheck.js b/test/healthcheck.js deleted file mode 100644 index 74805a0..0000000 --- a/test/healthcheck.js +++ /dev/null @@ -1,5 +0,0 @@ -const port = process.env.PORT || 8080; - -fetch(`http://127.0.0.1:${port}/healthz`) - .then((res) => process.exit(res.ok ? 0 : 1)) - .catch(() => process.exit(1)); diff --git a/test/healthcheck.test.js b/test/healthcheck.test.js deleted file mode 100644 index cfff444..0000000 --- a/test/healthcheck.test.js +++ /dev/null @@ -1,79 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; -import http from "node:http"; -import { spawn } from "node:child_process"; - -test("Healthcheck: test/healthcheck.js script exists and parses cleanly", () => { - const scriptPath = path.resolve(process.cwd(), "test/healthcheck.js"); - assert.ok(fs.existsSync(scriptPath), "test/healthcheck.js must exist"); - - const content = fs.readFileSync(scriptPath, "utf-8"); - assert.match(content, /127\.0\.0\.1/, "Must target IPv4 loopback 127.0.0.1 to avoid Alpine IPv6 lookup failures"); - assert.match(content, /\/healthz/, "Must target the /healthz endpoint"); -}); - -test("Healthcheck: test/healthcheck.js succeeds when server returns 200 OK", async () => { - const scriptPath = path.resolve(process.cwd(), "test/healthcheck.js"); - - // Start dummy HTTP server responding 200 on /healthz - const server = http.createServer((req, res) => { - if (req.url === "/healthz") { - res.writeHead(200, { "Content-Type": "application/json" }); - res.end(JSON.stringify({ status: "ok" })); - } else { - res.writeHead(404); - res.end(); - } - }); - - await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve)); - const port = server.address().port; - - try { - const exitCode = await new Promise((resolve) => { - const child = spawn(process.execPath, [scriptPath], { - env: { ...process.env, PORT: String(port) }, - }); - child.on("close", resolve); - }); - - assert.strictEqual(exitCode, 0, "healthcheck.js must exit with code 0 on healthy endpoint"); - } finally { - await new Promise((resolve) => server.close(resolve)); - } -}); - -test("Healthcheck: test/healthcheck.js fails when connection is refused or server is 500", async () => { - const scriptPath = path.resolve(process.cwd(), "test/healthcheck.js"); - - // Pick an unused high port - const exitCodeDown = await new Promise((resolve) => { - const child = spawn(process.execPath, [scriptPath], { - env: { ...process.env, PORT: "59999" }, - }); - child.on("close", resolve); - }); - assert.strictEqual(exitCodeDown, 1, "healthcheck.js must exit with code 1 when server is unreachable"); - - // Test 500 status code - const server = http.createServer((req, res) => { - res.writeHead(500); - res.end(); - }); - await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve)); - const port = server.address().port; - - try { - const exitCode500 = await new Promise((resolve) => { - const child = spawn(process.execPath, [scriptPath], { - env: { ...process.env, PORT: String(port) }, - }); - child.on("close", resolve); - }); - assert.strictEqual(exitCode500, 1, "healthcheck.js must exit with code 1 on HTTP 500"); - } finally { - await new Promise((resolve) => server.close(resolve)); - } -}); diff --git a/test/server.test.js b/test/server.test.js deleted file mode 100644 index 38bdb12..0000000 --- a/test/server.test.js +++ /dev/null @@ -1,87 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import fs from "node:fs"; -import http from "node:http"; -import path from "node:path"; -import { execSync } from "node:child_process"; -import { createServer } from "../server.js"; - -const TEST_PORT = 8999; -const BASE_URL = `http://127.0.0.1:${TEST_PORT}`; - -// Helper to perform HTTP GET requests -function get(urlPath) { - return new Promise((resolve, reject) => { - http.get(`${BASE_URL}${urlPath}`, (res) => { - let data = ""; - res.on("data", (chunk) => (data += chunk)); - res.on("end", () => { - resolve({ - statusCode: res.statusCode, - headers: res.headers, - body: data - }); - }); - }).on("error", reject); - }); -} - -test("Node Static Server: lifecycle, routing, and adversarial security tests", async (t) => { - // Ensure _site exists before running server tests - if (!fs.existsSync(path.resolve(process.cwd(), "_site/index.html"))) { - execSync("npm run build", { - stdio: "pipe", - env: { ...process.env, SITE_DOMAIN: "riverrooks.dev" } - }); - } - - const server = createServer(); - await new Promise((resolve) => server.listen(TEST_PORT, "127.0.0.1", resolve)); - - t.after(() => { - return new Promise((resolve) => server.close(resolve)); - }); - - await t.test("serves root index.html with 200 OK and text/html", async () => { - const res = await get("/"); - assert.equal(res.statusCode, 200); - assert.match(res.headers["content-type"], /text\/html/); - assert.match(res.body, //i); - // Verify security headers - assert.equal(res.headers["x-content-type-options"], "nosniff"); - assert.equal(res.headers["x-frame-options"], "DENY"); - }); - - await t.test("serves clean directory URL (/dispatches/)", async () => { - const res = await get("/dispatches/"); - assert.equal(res.statusCode, 200); - assert.match(res.headers["content-type"], /text\/html/); - }); - - await t.test("serves static assets with appropriate Content-Type", async () => { - const res = await get("/assets/css/main.css"); - assert.equal(res.statusCode, 200); - assert.match(res.headers["content-type"], /text\/css/); - }); - - await t.test("responds with 200 OK JSON on /healthz", async () => { - const res = await get("/healthz"); - assert.equal(res.statusCode, 200); - assert.match(res.headers["content-type"], /application\/json/); - const body = JSON.parse(res.body); - assert.equal(body.status, "ok"); - }); - - await t.test("returns 404 Not Found for non-existent routes", async () => { - const res = await get("/non-existent-file-xyz.html"); - assert.equal(res.statusCode, 404); - }); - - await t.test("adversarial: blocks path traversal attempts", async () => { - const res = await get("/../../../../etc/passwd"); - // Must either return 403 Forbidden or 404 Not Found, never 200 - assert.notEqual(res.statusCode, 200); - assert.ok(res.statusCode === 403 || res.statusCode === 404); - assert.doesNotMatch(res.body, /root:x:/); - }); -}); diff --git a/test/site-config.test.js b/test/site-config.test.js deleted file mode 100644 index d2f9a2c..0000000 --- a/test/site-config.test.js +++ /dev/null @@ -1,68 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import { execSync } from "node:child_process"; - -test("Site Config: throws explicit error when SITE_DOMAIN is unset", () => { - // Run isolated Node process with empty environment to verify error throw - const cmd = `node -e ' - process.env.SITE_DOMAIN = ""; - delete process.env.SITE_DOMAIN; - // mock empty cwd without .env - process.chdir("/tmp"); - import("${process.cwd()}/src/_data/site.js") - .then(() => process.exit(0)) - .catch(err => { - if (err.message.includes("FATAL CONFIGURATION ERROR: SITE_DOMAIN")) { - process.exit(42); - } - process.exit(1); - }); - '`; - - try { - execSync(cmd, { stdio: "pipe" }); - assert.fail("Should have thrown error when SITE_DOMAIN is missing"); - } catch (err) { - assert.equal(err.status, 42, "Process exited with status 42 (expected error caught)"); - } -}); - -test("Site Config: correctly parses SITE_DOMAIN and derives service subdomains", async () => { - process.env.SITE_DOMAIN = "testcluster.internal"; - delete process.env.SITE_URL; - - // Import site configuration dynamically - const { default: site } = await import(`../src/_data/site.js?t=${Date.now()}`); - - assert.equal(site.domain, "testcluster.internal"); - assert.equal(site.url, "https://testcluster.internal"); - - // Verify dynamic subdomains - const gitService = site.services.find((s) => s.name === "Gitea"); - assert.ok(gitService, "Gitea service exists"); - assert.equal(gitService.url, "https://git.testcluster.internal"); - assert.equal(gitService.tag, "git.testcluster.internal:2222"); - - const chefService = site.services.find((s) => s.name === "CyberChef"); - assert.ok(chefService, "CyberChef service exists"); - assert.equal(chefService.url, "https://chef.testcluster.internal"); - - // Verify navigation links - const navHome = site.nav.find((n) => n.label === "Home"); - assert.ok(navHome, "Nav Home link exists"); - assert.equal(navHome.url, "/"); - - const navGit = site.nav.find((n) => n.label === "Gitea"); - assert.ok(navGit, "Nav Gitea link exists"); - assert.equal(navGit.url, "https://git.testcluster.internal"); -}); - -test("Site Config: respects explicit SITE_URL override", async () => { - process.env.SITE_DOMAIN = "riverrooks.dev"; - process.env.SITE_URL = "http://localhost:8080"; - - const { default: site } = await import(`../src/_data/site.js?t=${Date.now()}`); - - assert.equal(site.domain, "riverrooks.dev"); - assert.equal(site.url, "http://localhost:8080"); -});