diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..5a725fb --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# River Rooks Blog Environment Template +# Copy to .env and adjust variables as needed: +SITE_DOMAIN=riverrooks.dev +SITE_URL=https://riverrooks.dev diff --git a/.gitignore b/.gitignore index 245dc40..1353688 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _site/ .cache/ .DS_Store *.log +.env diff --git a/Dockerfile b/Dockerfile index 0fabf8a..f1a4b1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,12 @@ FROM node:22-alpine AS builder WORKDIR /app +# Dynamic build arguments for domain & full URL +ARG SITE_URL=https://riverrooks.dev +ARG SITE_DOMAIN=riverrooks.dev +ENV SITE_URL=$SITE_URL +ENV SITE_DOMAIN=$SITE_DOMAIN + # Copy dependency definitions and install COPY package*.json ./ RUN npm ci diff --git a/docker-compose.yml b/docker-compose.yml index 2944726..d0584a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,15 @@ services: build: context: . dockerfile: Dockerfile + args: + SITE_URL: ${SITE_URL:-https://riverrooks.dev} + SITE_DOMAIN: ${SITE_DOMAIN:-riverrooks.dev} image: river-rooks-blog:latest container_name: river_rooks_web restart: unless-stopped + environment: + - SITE_URL=${SITE_URL:-https://riverrooks.dev} + - SITE_DOMAIN=${SITE_DOMAIN:-riverrooks.dev} ports: - "8080:80" healthcheck: diff --git a/src/_data/site.js b/src/_data/site.js new file mode 100644 index 0000000..8f26429 --- /dev/null +++ b/src/_data/site.js @@ -0,0 +1,101 @@ +import fs from "node:fs"; +import path from "node:path"; + +// Load .env variables into process.env if present +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 || "riverrooks.dev"; +const siteUrl = process.env.SITE_URL || `https://${siteDomain}`; + +export default { + domain: siteDomain, + url: siteUrl, + name: "River Rooks", + title: "River Rooks | Homelab Gateway", + description: "Engineering Notes, CTF Write-Ups & Systems Architecture", + status: "SYSTEMS NOMINAL", + author: "River Rooks", + systemSpec: "IEEE STD 1003.1", + nav: [ + { + label: "Gateway 3", + url: "/" + }, + { + label: "Dispatches", + url: "/dispatches/" + }, + { + label: "Git Forge", + url: `https://git.${siteDomain}`, + external: true + }, + { + label: "RSS Feed", + url: "/feed.xml" + } + ], + services: [ + { + name: "Forgejo Git", + url: `https://git.${siteDomain}`, + tag: `git.${siteDomain}:2222`, + desc: "Self-hosted code repositories & dotfiles." + }, + { + name: "CyberChef", + url: `https://chef.${siteDomain}`, + tag: `chef.${siteDomain}:443`, + desc: "Hex decoding, cryptography & forensics." + }, + { + name: "Stirling PDF", + url: `https://pdf.${siteDomain}`, + tag: `pdf.${siteDomain}:443`, + desc: "Private document OCR and manipulation." + }, + { + name: "Uptime Kuma", + url: `https://status.${siteDomain}`, + tag: `status.${siteDomain}:443`, + desc: "High-frequency ping & latency monitors." + } + ], + topics: [ + { + title: "Hardware & Firmware", + slug: "firmware", + desc: "SPI dumping, UART interfacing & flash memory extraction", + badge: "TRACE: HARDWARE" + }, + { + title: "Systems Architecture", + slug: "homelab", + desc: "Traefik routing, WireGuard mesh & containerized microkernels", + badge: "SYSTEM: INFRA" + }, + { + title: "Offensive Security", + slug: "security", + desc: "Kernel exploitation, binary reverse-engineering & CTF writeups", + badge: "CTF: OFFENSIVE" + } + ] +}; diff --git a/src/_data/site.json b/src/_data/site.json deleted file mode 100644 index 913ef9e..0000000 --- a/src/_data/site.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "River Rooks", - "title": "River Rooks | Homelab Gateway", - "description": "Engineering Notes, CTF Write-Ups & Systems Architecture", - "status": "SYSTEMS NOMINAL", - "author": "River Rooks", - "systemSpec": "IEEE STD 1003.1", - "nav": [ - { - "label": "Gateway 3", - "url": "/" - }, - { - "label": "Dispatches", - "url": "/dispatches/" - }, - { - "label": "Git Forge", - "url": "https://git.rooks.dev", - "external": true - }, - { - "label": "RSS Feed", - "url": "/feed.xml" - } - ], - "topics": [ - { - "title": "Hardware & Firmware", - "slug": "firmware", - "desc": "SPI dumping, UART interfacing & flash memory extraction", - "badge": "TRACE: HARDWARE" - }, - { - "title": "Systems Architecture", - "slug": "homelab", - "desc": "Traefik routing, WireGuard mesh & containerized microkernels", - "badge": "SYSTEM: INFRA" - }, - { - "title": "Offensive Security", - "slug": "security", - "desc": "Kernel exploitation, binary reverse-engineering & CTF writeups", - "badge": "CTF: OFFENSIVE" - } - ] -} diff --git a/src/_includes/partials/footer.njk b/src/_includes/partials/footer.njk index 6d4582d..6f5a442 100644 --- a/src/_includes/partials/footer.njk +++ b/src/_includes/partials/footer.njk @@ -8,6 +8,6 @@ diff --git a/src/index.njk b/src/index.njk index d6f714e..5f101f6 100644 --- a/src/index.njk +++ b/src/index.njk @@ -20,7 +20,7 @@ title: "River Rooks | Homelab Gateway"
PRIMARY DESTINATIONS: [1] Technical Blog ({{ collections.posts.length }} Articles) • - [2] Forgejo Git Repos • + [2] Forgejo Git Repos • [3] Public Tools • [4] Cluster Telemetry
@@ -70,41 +70,19 @@ title: "River Rooks | Homelab Gateway" // HOMELAB SERVICES ROUTER - 4 PUBLIC TOOLS + {{ site.services.length }} PUBLIC TOOLS
- -
-
Forgejo Git
-
git.rooks.dev:2222
-
-

Self-hosted code repositories & dotfiles.

-
- - -
-
CyberChef
-
chef.rooks.dev:443
-
-

Hex decoding, cryptography & forensics.

-
- - -
-
Stirling PDF
-
pdf.rooks.dev:443
-
-

Private document OCR and manipulation.

-
- - -
-
Uptime Kuma
-
status.rooks.dev:443
-
-

High-frequency ping & latency monitors.

-
+ {% for svc in site.services %} + +
+
{{ svc.name }}
+
{{ svc.tag }}
+
+

{{ svc.desc }}

+
+ {% endfor %}