diff --git a/OPERATIONS.md b/OPERATIONS.md
index ab970f55..e95244dc 100644
--- a/OPERATIONS.md
+++ b/OPERATIONS.md
@@ -439,7 +439,7 @@ The maps are generated by [`capture/build-redirects.py`](./capture/build-redirec
The bundle also carries `viljoen.family`, a single static page whose source is [`sites/viljoen.family/`](./sites/viljoen.family/). `make-release.sh` copies it to `family/` beside `site/`, leaving out its README, and precompresses it the same way. It shares the release, the containers, and the rollback with the blog, so a family change ships as a blog release.
-A second site block in `deploy/Caddyfile` serves it on the same port, selected by the `Host` header the proxy forwards. Any other hostname falls through to the blog's `:8080` block, so the blog's redirects never answer on the family host. The family block carries its own security headers and CSP, and answers a missing path with the page itself at a `404` status.
+A second site block in `deploy/Caddyfile` serves it on the same port, selected by the `Host` header the proxy forwards. Any other hostname falls through to the blog's `:8080` block, so the blog's redirects never answer on the family host. The family block carries its own security headers and CSP, and answers a missing path with the page itself at a `404` status. It also routes the page's two languages: `/` redirects to `/af/` for a browser whose first language is Afrikaans, while `/en/` and `/af/` never redirect.
**A rollback to a release older than the family block drops it.** Every hostname then reaches the blog block, so `viljoen.family` serves the blog, indexable on production, until a release carrying the block is live again.
diff --git a/deploy/Caddyfile b/deploy/Caddyfile
index 5ce5b795..c352d70b 100644
--- a/deploy/Caddyfile
+++ b/deploy/Caddyfile
@@ -137,11 +137,24 @@ http://viljoen.family:8080, http://viljoen.vps.insanegenius.net:8080 {
Strict-Transport-Security "max-age=31536000"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
- Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com; connect-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; script-src 'self' 'unsafe-inline'; img-src 'self' data:"
+ Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com; connect-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; script-src 'self'; img-src 'self' data:"
}
@svg path *.svg
header @svg Cache-Control "public, max-age=604800"
+ @code path *.css *.js
+ header @code Cache-Control "no-cache"
+
+ # The root follows the browser's first language, and /en/ and /af/ never redirect, so the language switch always holds.
+ @af_first {
+ path /
+ header_regexp Accept-Language `(?i)^\s*af(-[a-z0-9]+)*\s*(,|$|;\s*q\s*=\s*(1|0?\.0*[1-9]))`
+ }
+ header / +Vary Accept-Language
+ redir @af_first /af/{?query} 302
+ redir /en /en/ 308
+ redir /af /af/ 308
+ rewrite /en/ /index.html
file_server {
precompressed br gzip
@@ -149,9 +162,18 @@ http://viljoen.family:8080, http://viljoen.vps.insanegenius.net:8080 {
# A single-page site has nowhere better to send a stray path than the page itself.
handle_errors {
- rewrite * /index.html
- file_server {
- precompressed br gzip
+ @af_page path /af/*
+ handle @af_page {
+ rewrite * /af/index.html
+ file_server {
+ precompressed br gzip
+ }
+ }
+ handle {
+ rewrite * /index.html
+ file_server {
+ precompressed br gzip
+ }
}
}
diff --git a/sites/viljoen.family/README.md b/sites/viljoen.family/README.md
index d5823a7c..3c72a366 100644
--- a/sites/viljoen.family/README.md
+++ b/sites/viljoen.family/README.md
@@ -10,6 +10,7 @@ The single-page genealogy site for the Viljoen family, served at `viljoen.family
- [Page Design](#page-design)
- [How the Tree Is Drawn](#how-the-tree-is-drawn)
- [Facts on the Page and Their Sources](#facts-on-the-page-and-their-sources)
+- [Languages](#languages)
- [Local Preview](#local-preview)
- [Ideas Not Yet Done](#ideas-not-yet-done)
@@ -17,7 +18,10 @@ The single-page genealogy site for the Viljoen family, served at `viljoen.family
| File | What it is |
| --- | --- |
-| `index.html` | The whole page, with inline CSS and the inline tree-drawing script |
+| `index.html` | The English page, served at `/` and `/en/` |
+| `af/index.html` | The Afrikaans page, served at `/af/` |
+| `site.css` | The styles both pages share |
+| `site.js` | The tree-drawing script both pages share |
| `crest.svg` | The full achievement (crest, helm, mantling, shield, name scroll), viewBox 336x418 |
| `favicon.svg` | The shield alone, cut from `crest.svg` |
| `apple-touch-icon.png` | 180x180, `favicon.svg` on parchment |
@@ -50,7 +54,7 @@ The arms derive from the French family Villon de Varennes, whose crest was a gol
- **Frame:** a 2.5px red border plus an inner 1px gold rule (`.frame::before`) with rounded corners and four gold corner flourishes (`#corner` symbol). A negative margin on the masthead equals the frame's top margin (128px, or 96px on phones). That puts the top border behind the mantling, so change both values together.
- **Paper texture:** an inline SVG `feTurbulence` noise data URI plus a radial vignette on `html`.
- **Divider:** a simplified Huguenot cross (a Maltese cross with fleur points, balls on the tips, and a hanging dove), the `#huguenot-cross` symbol.
-- **CSP:** the policy in `deploy/Caddyfile` allows `'unsafe-inline'` for scripts and styles because both are inline. Moving them to `site.css` and `site.js` lets the policy drop it. Test in a browser after any CSP change, because a blocked script fails silently and the tree simply does not draw.
+- **CSP:** the policy in `deploy/Caddyfile` allows only `'self'` for scripts, since the one script is `site.js`. Styles keep `'unsafe-inline'` for the `style` attributes and the `
+
of Clermont, France · of Middelburg, the Netherlands xmarried 1676 at the Cape of Good Hope
@@ -378,19 +116,19 @@
François Villion
-
OriginsOorsprong
+
OriginsOorsprong
The Viljoens of South Africa descend from François Villion, a French Huguenot from Clermont who reached the Cape of Good Hope in 1671, well before the main Huguenot settlement of 1688.
In 1676 he married Cornelia Campenaar of Middelburg in the Netherlands, and the couple farmed near Stellenbosch. Their six children were baptized in Cape Town and Stellenbosch between 1677 and 1689, and over the generations the French name Villion settled into its Afrikaans form, Viljoen.
-
The ArmsDie familiewapen
+
The ArmsDie familiewapen
Gules, a saltire Or. Mantling Or and Gules. Crest: a pair of eagle's wings folded Or.
A gold St Andrew's cross on red, derived from the arms of the French family Villon de Varennes. Their crest was a golden mural crown. At the Viljoen Festival of 1976 the Viljoen Familiebond voted to replace it with the pair of golden eagle's wings shown above.