diff options
| author | Leitwolf11 | 2026-11-16 16:27:16 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-16 16:27:16 +0300 |
| commit | 62faa7158ce51495dcdd09e7858c23faee707cfd (patch) | |
| tree | eb76a51454bb85aff0ee5ec43a142b8d16f90a86 | |
| parent | cd4f0c3fb7b77640f55a807d306ae8389283f9f7 (diff) | |
| download | progmaweb-site/catch3-uk.tar.gz | |
Serve the Catch3 site at catch3.uksite/catch3-uk
Catch3 has a domain of its own. Progmaweb answers catch3.uk with the
Catch3 page, its sitemap and its robots entry; catch3.progmasoft.com and
www.catch3.uk send a 308 to it from nginx, so one address serves the
site. catch3.uk has its own certificate (ops/README.md).
The page said Catch3 adds a C++20 library; it is a C++17 library, in
all four languages of the page.
Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
| -rw-r--r-- | apps/web/app/catch3/page.tsx | 4 | ||||
| -rw-r--r-- | apps/web/app/robots.ts | 3 | ||||
| -rw-r--r-- | apps/web/app/sitemap.ts | 5 | ||||
| -rw-r--r-- | apps/web/lib/product-sites.ts | 10 | ||||
| -rw-r--r-- | apps/web/lib/products.ts | 2 | ||||
| -rw-r--r-- | apps/web/lib/sites.ts | 2 | ||||
| -rw-r--r-- | apps/web/proxy.ts | 9 | ||||
| -rw-r--r-- | apps/web/tests/sites.test.mjs | 2 | ||||
| -rw-r--r-- | ops/README.md | 5 | ||||
| -rw-r--r-- | ops/nginx/progmaweb.conf | 60 |
10 files changed, 86 insertions, 16 deletions
diff --git a/apps/web/app/catch3/page.tsx b/apps/web/app/catch3/page.tsx index f534373..c32593f 100644 --- a/apps/web/app/catch3/page.tsx +++ b/apps/web/app/catch3/page.tsx @@ -13,7 +13,7 @@ export async function generateMetadata(): Promise<Metadata> { return { title: `Catch3 · ${catch3.tagline}`, description: catch3.description, - alternates: { canonical: "https://catch3.progmasoft.com/" }, + alternates: { canonical: "https://catch3.uk/" }, }; } @@ -33,7 +33,7 @@ TEST_CASE( "reversing twice gives the original", "[property]" ) { } ); }`; -/** catch3.progmasoft.com: the site of Catch3. */ +/** catch3.uk: the site of Catch3. */ export default async function Catch3Page() { const locale = await getLocale(); const { catch3, common } = getSitesMessages(locale); diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.ts index a82b6dc..1bc1a5f 100644 --- a/apps/web/app/robots.ts +++ b/apps/web/app/robots.ts @@ -21,7 +21,8 @@ export default async function robots(): Promise<MetadataRoute.Robots> { // Each host with pages of its own names its own sitemap. const sitemap = canonicalHost === "viget.progmasoft.com" || - canonicalHost === "product.progmasoft.com" + canonicalHost === "product.progmasoft.com" || + canonicalHost === "catch3.uk" ? `https://${canonicalHost}/sitemap.xml` : "https://progmasoft.com/sitemap.xml"; return { diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.ts index 20565a1..3c89ce8 100644 --- a/apps/web/app/sitemap.ts +++ b/apps/web/app/sitemap.ts @@ -33,6 +33,11 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> { }, ]; } + if (host === "catch3.uk") { + return [ + { url: "https://catch3.uk/", changeFrequency: "weekly", priority: 1 }, + ]; + } if (host === "product.progmasoft.com") { return [ { diff --git a/apps/web/lib/product-sites.ts b/apps/web/lib/product-sites.ts index 0963f2e..e689d1e 100644 --- a/apps/web/lib/product-sites.ts +++ b/apps/web/lib/product-sites.ts @@ -4,7 +4,7 @@ import type { Locale } from "./localization"; /** - * The text of the product site Progmaweb serves itself, catch3.progmasoft.com. + * The text of the product site Progmaweb serves itself, catch3.uk. * The facts follow the READMEs and documentation of the product repositories. */ interface SitesMessages { @@ -37,7 +37,7 @@ export const sitesMessages: Record<Locale, SitesMessages> = { eyebrow: "Progmasoft Catch3", tagline: "C++ testing beyond assertions.", description: - "Catch3 keeps the expressive test-writing model of Catch2 and adds a C++20 library of its own: native property testing, snapshots and structured results.", + "Catch3 keeps the expressive test-writing model of Catch2 and adds a C++17 library of its own: native property testing, snapshots and structured results.", disclaimer: "Catch3 is independently maintained. It is not an official Catch2 release and is not endorsed by Catch2's maintainers.", exampleTitle: "A first property", @@ -89,7 +89,7 @@ export const sitesMessages: Record<Locale, SitesMessages> = { eyebrow: "Progmasoft Catch3", tagline: "C++-Tests jenseits von Assertions.", description: - "Catch3 behält das ausdrucksstarke Testmodell von Catch2 und ergänzt eine eigene C++20-Bibliothek: native Eigenschaftstests, Snapshots und strukturierte Ergebnisse.", + "Catch3 behält das ausdrucksstarke Testmodell von Catch2 und ergänzt eine eigene C++17-Bibliothek: native Eigenschaftstests, Snapshots und strukturierte Ergebnisse.", disclaimer: "Catch3 wird unabhängig gepflegt. Es ist keine offizielle Catch2-Version und wird von den Catch2-Maintainern nicht unterstützt.", exampleTitle: "Eine erste Eigenschaft", @@ -141,7 +141,7 @@ export const sitesMessages: Record<Locale, SitesMessages> = { eyebrow: "Progmasoft Catch3", tagline: "Тестирование C++ за пределами утверждений.", description: - "Catch3 сохраняет выразительную модель тестов Catch2 и добавляет собственную библиотеку на C++20: тестирование на основе свойств, снимки и структурированные результаты.", + "Catch3 сохраняет выразительную модель тестов Catch2 и добавляет собственную библиотеку на C++17: тестирование на основе свойств, снимки и структурированные результаты.", disclaimer: "Catch3 развивается независимо. Это не официальный выпуск Catch2, и сопровождающие Catch2 его не поддерживают.", exampleTitle: "Первое свойство", @@ -193,7 +193,7 @@ export const sitesMessages: Record<Locale, SitesMessages> = { eyebrow: "Progmasoft Catch3", tagline: "בדיקות C++ מעבר לטענות.", description: - "Catch3 שומרת על מודל כתיבת הבדיקות של Catch2 ומוסיפה ספריית C++20 משלה: בדיקות מבוססות תכונות, תמונות מצב ותוצאות מובנות.", + "Catch3 שומרת על מודל כתיבת הבדיקות של Catch2 ומוסיפה ספריית C++17 משלה: בדיקות מבוססות תכונות, תמונות מצב ותוצאות מובנות.", disclaimer: "Catch3 מתוחזקת באופן עצמאי. היא אינה גרסה רשמית של Catch2 ואינה נתמכת על ידי המתחזקים של Catch2.", exampleTitle: "תכונה ראשונה", diff --git a/apps/web/lib/products.ts b/apps/web/lib/products.ts index daa18bc..80de402 100644 --- a/apps/web/lib/products.ts +++ b/apps/web/lib/products.ts @@ -93,7 +93,7 @@ export const products: Record<ProductSlug, ProductFacts> = { }, catch3: { name: "Catch3", - site: "https://catch3.progmasoft.com/", + site: "https://catch3.uk/", ...github("catch3"), license: "BSL-1.0", language: "C++", diff --git a/apps/web/lib/sites.ts b/apps/web/lib/sites.ts index f48530b..5204339 100644 --- a/apps/web/lib/sites.ts +++ b/apps/web/lib/sites.ts @@ -23,7 +23,7 @@ export function productRoute(pathname: string): string | null { : null; } -/** The public page of catch3.progmasoft.com. */ +/** The public page of catch3.uk. */ export function catch3Route(pathname: string): string | null { return trimmed(pathname) === "/" ? "/catch3" : null; } diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts index 1993e2e..4bf1163 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.ts @@ -57,7 +57,14 @@ const ownSites: OwnSite[] = [ route: productRoute, api: false, }, - { hosts: hostsOf("catch3"), root: "/catch3", route: catch3Route, api: false }, + // Catch3's site has a domain of its own; catch3.progmasoft.com sends a 308 + // there from nginx. + { + hosts: new Set(["catch3.uk", "catch3.localhost"]), + root: "/catch3", + route: catch3Route, + api: false, + }, ]; export function proxy(request: NextRequest) { diff --git a/apps/web/tests/sites.test.mjs b/apps/web/tests/sites.test.mjs index 91d4adc..77c89d4 100644 --- a/apps/web/tests/sites.test.mjs +++ b/apps/web/tests/sites.test.mjs @@ -56,7 +56,7 @@ test("the catalog lists the projects, each with its repository", () => { `${slug}: released exactly when it has a release`, ); } - assert.equal(products.catch3.site, "https://catch3.progmasoft.com/"); + assert.equal(products.catch3.site, "https://catch3.uk/"); assert.equal(isProductSlug("viget"), false); assert.equal(isProductSlug("xide"), false); }); diff --git a/ops/README.md b/ops/README.md index 98bfddd..252bfb0 100644 --- a/ops/README.md +++ b/ops/README.md @@ -191,7 +191,10 @@ token, so every application has to ask again. Back up both files with the databa The certificate of `progmasoft.com` must name `credentials.progmasoft.com`, `authorize.progmasoft.com`, `console.progmasoft.com`, `product.progmasoft.com` and `catch3.progmasoft.com` as well; expand it with certbot's webroot plugin before the vhosts are enabled, then check -`/.well-known/openid-configuration`, the sign-in page and the console from outside. +`/.well-known/openid-configuration`, the sign-in page and the console from outside. `catch3.progmasoft.com` only +sends a 308 to `catch3.uk`, the site of Catch3, which has a certificate of its own for `catch3.uk` and +`www.catch3.uk` (`certbot certonly --webroot -w /var/lib/letsencrypt -d catch3.uk -d www.catch3.uk --key-type +ecdsa`). ## Reserved accounts diff --git a/ops/nginx/progmaweb.conf b/ops/nginx/progmaweb.conf index f4107ee..59dee68 100644 --- a/ops/nginx/progmaweb.conf +++ b/ops/nginx/progmaweb.conf @@ -418,8 +418,7 @@ server { } } -# The product catalog (product.progmasoft.com) and the product site Progmaweb -# serves itself (catch3.progmasoft.com): pages of the Next.js site only. +# The product catalog (product.progmasoft.com): pages of the Next.js site only. server { listen 80; listen [::]:80; @@ -465,6 +464,7 @@ server { } } +# catch3.progmasoft.com was Catch3's site; every path moves to catch3.uk. server { listen 80; listen [::]:80; @@ -476,7 +476,7 @@ server { } location / { - return 308 https://catch3.progmasoft.com$request_uri; + return 308 https://catch3.uk$request_uri; } } @@ -490,6 +490,60 @@ server { ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + + location / { + return 308 https://catch3.uk$request_uri; + } +} + +# catch3.uk: the site of Catch3, pages of the Next.js site only. www goes to +# the bare name. +server { + listen 80; + listen [::]:80; + server_name catch3.uk www.catch3.uk; + server_tokens off; + + location ^~ /.well-known/acme-challenge/ { + root /var/lib/letsencrypt; + default_type text/plain; + } + + location / { + return 308 https://catch3.uk$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name www.catch3.uk; + server_tokens off; + + ssl_certificate /etc/letsencrypt/live/catch3.uk/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/catch3.uk/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + + location / { + return 308 https://catch3.uk$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name catch3.uk; + server_tokens off; + + ssl_certificate /etc/letsencrypt/live/catch3.uk/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/catch3.uk/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + client_max_body_size 1m; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; |