From 898b52edcb47bcb3e9d6106e74ca73e74ea01e70 Mon Sep 17 00:00:00 2001 From: sillylaird Date: Thu, 3 Sep 2026 00:33:59 +0000 Subject: import live www.sillylaird.ca webroot --- docs/FUTURE_PROOF.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/FUTURE_PROOF.md (limited to 'docs/FUTURE_PROOF.md') diff --git a/docs/FUTURE_PROOF.md b/docs/FUTURE_PROOF.md new file mode 100644 index 0000000..298dc6a --- /dev/null +++ b/docs/FUTURE_PROOF.md @@ -0,0 +1,62 @@ +# Future Proofing (No Generator) + +This site is intentionally hand-edited PHP. Keep the *style* the same while +making maintenance easier and the surface more resilient. + +## Principles + +- Navigation and core content should work without JavaScript. +- External embeds should always have a plain-link fallback. +- URLs should be stable; if something must move, leave a redirect page. +- Translations follow a consistent naming rule (`_jp.php` / `_zh.php`). +- Secrets stay outside the document root. +- nginx owns security headers (CSP, HSTS, nosniff, Referrer-Policy, Permissions-Policy). + +## What We Have + +### 1) Sitemap and robots.txt + +- `robots.txt` points to `sitemap.xml` and disallows admin/API/tools paths +- `python3 tools/generate_sitemap.py` rebuilds the public crawl map + +### 2) Human-friendly site map + +- `/map/` is a clickable index for humans (with JP/ZH variants) + +### 3) Translation naming convention + +- Default English: `page.php` or `section/index.php` +- Japanese: `page_jp.php` or `section/index_jp.php` +- Simplified Chinese: `page_zh.php` or `section/index_zh.php` +- Strings live in `locales/{en,ja,zh}.php` via `t('key')` + +### 4) Redirect page pattern + +If you rename or move a page, keep an old file that points to the new place. + +Example: + +```php +