1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Site Management (No Generator)
This site is hand-edited PHP 8.3 (no framework, no build step). Pages are
plain `.php` files; shared markup lives in `partials/`.
## Shared assets
- Global CSS: `/assets/css/site.css`
- Shared JS (menu + language + blog list): `/assets/js/site.js`
- Fonts: `/assets/css/fonts.css` (self-hosted; no Google Fonts)
- Cache busting: `partials/asset_version.php` → `asset_v('assets/css/site.css')`
## Shared includes
| Partial | Role |
|---------|------|
| `partials/head_meta.php` | OG / Twitter / canonical / hreflang / favicon / feeds |
| `partials/header.php` | Fixed site header |
| `partials/footer.php` | Footer |
| `partials/i18n.php` | `t($key)` — locale from `_jp` / `_zh` filename suffix |
| `partials/session.php` | Session bootstrap (admin only; no extra security headers) |
| `partials/asset_version.php` | `asset_v()` mtime query strings |
Pass a `$meta` array then `include` `head_meta.php` (see `links.php` or `now/index.php`).
## Translations
- Dicts: `locales/{en,ja,zh}.php`
- Page stubs: `page_jp.php` / `page_zh.php` usually `require` the EN page
- Missing keys fall back to English, then the key string
- EN is the source of truth; keep ja/zh in sync when adding keys
## SEO / crawl basics
- `robots.txt` points to `sitemap.xml` and disallows `/admin`, `/api/`, etc.
- Rebuild sitemap: `python3 tools/generate_sitemap.py`
- Nightly: `tools/run_audits.sh` (see root `README.md` cron examples)
## Admin
- Login: `/admin/login.php`
- Panel: `/admin.php` (blog, changelog, vibe, now, motd, startpage, journal, guestbook, collection)
- MOTD: `/admin.php?section=motd` writes `motd/motd.json`. waifu (`/opt/waifu-bot`) polls it and posts to `based@conference.sillylaird.ca` (the room, not individual nicks). Public page: `/motd/`.
- Password hash lives **outside** the docroot at `/var/lib/sillylaird/admin_auth.php`
(override with `ADMIN_AUTH_FILE`). Prefer `password_hash` / `password_verify`;
legacy `sha256` + salt still supported. Generate a new hash with
`php /mnt/slab/make_admin_hash.php`.
- Game collection: small-web inventory catalog (photo | `name :: title` | specs).
Public pages:
- `/gaming/collection/` — **Video games** (`videogames[]` systems/consoles)
- `/gaming/collection/tech.php` — **Library** (titles under systems)
- `/gaming/collection/packs.php` — song packs (`online[]`)
- `/gaming/collection/wishlist.php` — Wishlist across all three
Shared: `gaming/collection/_lib.php`. Data: `games.json`.
Admin **Collection**: preview list + CRUD for video games, tech, packs;
photo upload to `gaming/collection/images/`.
|