Arcology Engine

Arcology Domain Map Configuration

Contents

Introduction

This file defines the SITE → domain mapping and per-site metadata for the Arcology web publishing system. The org tables below are the source of truth. An arroyo lua block tangles them to a domains.json file at build time, which is loaded by DomainMap.load() at server startup.

See publishing.org for the DomainMap implementation.

Site Table

One row per SITE. Title is the human-readable site title shown in the page header. Css File is an optional per-site stylesheet (served from /static/). Link Color is a hex color (e.g. =#a64040=) used by the dynamic /sites.css endpoint to color cross-site links pointing at this site's domains. Hljs Theme is the highlight.js theme name (without .min.css) used for source block syntax highlighting on this site — the file is served from /static/hljs/<theme>.min.css; leave blank to fall back to github-dark. Domains is a comma-separated list (e.g. rix.si,thelionsrear.com) — a SITE may serve multiple domains; the lua generator splits this into a JSON array.

SITE Title Css File Link Color Code Theme Domains
lionsrear The Lions Rear arcology/css/lionsrear.css #a64040 base16/atelier-savanna-light v2.rix.si,thelionsrear.com
garden The Arcology Garden arcology/css/garden.css #40a660 kimbie-light v2.whatthefuck.computer,arcology.garden
arcology Arcology Engine arcology/css/arcology-engine.css #b0d0fc base16/gruvbox-light-medium v2.engine.arcology.garden
cce CCE arcology/css/cce.css #b0d0fc base16/atelier-lakeside-light v2.cce.whatthefuck.computer

JSON Generator

This lua block reads the site-meta table and emits a single domains.json file. The output is a JSON object with a sites array; each site carries its key, title, cssFile, linkColor, hljsTheme, and a domains array. The :comments none header skips delimiter comment wrapping since this is a config file, not source code.

lua#+name: gen-domain-json:eval arroyo:var tbl=site-meta:tangle ../web/domains.json:comments none
local function esc(s)
  s = tostring(s or "")
  s = s:gsub('\\', '\\\\')
  s = s:gsub('"', '\\"')
  return s
end
local function quote(s)
  return '"' .. esc(s) .. '"'
end
local function quoteList(list)
  local parts = {}
  for _, v in ipairs(list) do
    table.insert(parts, quote(v))
  end
  return '[' .. table.concat(parts, ',') .. ']'
end
local function split(str, sep)
  local parts = {}
  for s in string.gmatch(str, "([^" .. sep .. "]+)") do
    table.insert(parts, s)
  end
  return parts
end
local parts = {}
for _, row in ipairs(tbl) do
  local key = row[1]
  local title = (row[2] and row[2] ~= "") and quote(row[2]) or "null"
  local cssFile = (row[3] and row[3] ~= "") and quote(row[3]) or "null"
  local linkColor = (row[4] and row[4] ~= "") and quote(row[4]) or "null"
  local hljsTheme = (row[5] and row[5] ~= "") and quote(row[5]) or "null"
  local domains = quoteList(split(row[6], ","))
  table.insert(parts, string.format(
    '    {"key":%s,"title":%s,"cssFile":%s,"linkColor":%s,"hljsTheme":%s,"domains":%s}',
    quote(key), title, cssFile, linkColor, hljsTheme, domains
  ))
end
return '{\n  "sites": [\n' .. table.concat(parts, ',\n') .. '\n  ]\n}\n'