🤖 feat: migrate static S3 storage to Cloudflare R2 and add multi-locale SSG support (#70)
## Summary - **Cloudflare R2 Migration**: - Migrated `static.ermnvldmr.com` asset storage to Cloudflare R2 bucket `com-ermnvldmr-static` (location `WEUR`). - Added support for `COM_ERMNVLDMR_STATIC_PUBLIC_URL` fallback in `@ermnvldmr/cli` to properly format public asset URLs for non-dotted bucket names. - Relocated public CA cert to `/dev/ssl/certs/ErmnvldmrDevelopmentRootCA.pem` and updated `REMOTE_ROOT_CA_URL` references in `@ermnvldmr/rsbuild-config` and `ensure-dev-certs.mjs`. - Configured R2 CORS policies using wildcards (`https://*.ermnvldmr.com`, `https://ermnvldmr.com`, `https://localhost.ermnvldmr.com*`, `http://localhost*`, `https://direct.yandex.ru`, `https://*.direct.yandex.ru`, `https://localhost.yandex.ru*`). - Enforced minimum TLS 1.2 on zone `ermnvldmr.com`. - Updated encrypted `.env.dev` and GitHub secrets in both `deytenit/ermnvldmr.com` and `deytenit/apex.ermnvldmr.com`. - **Multi-locale SSG Support**: - Added `NormalModuleReplacementPlugin` to SSR runner in `@ermnvldmr/ssg` for automatic `.en.mdx` -> `.${locale}.mdx` substitution during Russian builds. - Added page metadata extraction (`getPageOptions`) in `@ermnvldmr/ssg` for pre-rendered `<title>` and `<meta name="description">` tags. - Added unit test suite for `createPage` and updated `services/www` build scripts (`build:all`, `build:en`, `build:ru`, `dev:en`, `dev:ru`).
This commit is contained in:
1 parent
649d6c3fd0
commit
9200529bf0
16 files changed
+442
-368
No files matched your search
@@ -10,6 +10,7 @@ export default defineCli({
|
||||
sourceFilesPattern: 'content/**/*.{md,html}',
|
||||
urlPrefixes: ['/static/', '/images/'],
|
||||
bucket: env('COM_ERMNVLDMR_STATIC_S3_BUCKET'),
|
||||
publicUrl: env('COM_ERMNVLDMR_STATIC_PUBLIC_URL', 'https://static.ermnvldmr.com'),
|
||||
region: env('COM_ERMNVLDMR_STATIC_S3_REGION'),
|
||||
endpoint: env('COM_ERMNVLDMR_STATIC_S3_ENDPOINT_URL'),
|
||||
accessKeyId: env('COM_ERMNVLDMR_STATIC_AWS_ACCESS_KEY_ID'),
|
||||
|
||||
@@ -7,6 +7,7 @@ export default defineCli({
|
||||
description: 'Sync static assets to S3',
|
||||
targetPrefix: 'www',
|
||||
bucket: env('COM_ERMNVLDMR_STATIC_S3_BUCKET'),
|
||||
publicUrl: env('COM_ERMNVLDMR_STATIC_PUBLIC_URL', 'https://static.ermnvldmr.com'),
|
||||
region: env('COM_ERMNVLDMR_STATIC_S3_REGION'),
|
||||
endpoint: env('COM_ERMNVLDMR_STATIC_S3_ENDPOINT_URL'),
|
||||
accessKeyId: env('COM_ERMNVLDMR_STATIC_AWS_ACCESS_KEY_ID'),
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
"cli": "ermnvldmr-cli",
|
||||
"sync:static": "pnpm cli sync:static",
|
||||
"dev": "rsbuild dev",
|
||||
"build": "rsbuild build",
|
||||
"dev:en": "LOCALE=en rsbuild dev",
|
||||
"dev:ru": "LOCALE=ru rsbuild dev",
|
||||
"build": "pnpm run build:all",
|
||||
"build:en": "LOCALE=en rsbuild build",
|
||||
"build:ru": "LOCALE=ru rsbuild build",
|
||||
"build:all": "pnpm run build:en && pnpm run build:ru",
|
||||
|
||||
Reference in new issue
Block a user