aboutsummaryrefslogtreecommitdiffstats
path: root/docs/MANAGE.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/MANAGE.md')
-rw-r--r--docs/MANAGE.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/MANAGE.md b/docs/MANAGE.md
new file mode 100644
index 0000000..c8f2537
--- /dev/null
+++ b/docs/MANAGE.md
@@ -0,0 +1,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/`.