content: complete bilingual notes and align site content #7

Merged
chatgpt merged 22 commits from content/review-and-complete into main 2026-07-16 15:30:13 +00:00
Owner

Summary

Completes the public content of qluna-site while making Markdown the primary editing, page-definition, and site-shell configuration surface.

  • adds English versions of the two existing notes with independent creation dates and revision histories;
  • introduces stable translationKey pairing for article-level canonical/hreflang metadata;
  • moves homepage, about, projects, timeline, and thoughts copy into src/content/pages/**/*.md;
  • introduces typed home, thoughts, and reusable content templates;
  • generates ordinary bilingual pages through [page].astro, with locale-specific public slugs paired by stable pageKey values;
  • moves brand, navigation, locale-switch labels, and contact email into src/content/settings/*.md;
  • validates navigation against routes generated for the same locale;
  • corrects deployment architecture documentation and documents reuse boundaries.

No unpublished book completion, product launch, successful production deployment, or commercial availability is claimed.

Content and SEO safeguards

  • translated notes use explicit real counterpart URLs for hreflang and language switching;
  • duplicate translation keys fail the build;
  • note metadata validates versions, date ordering, and stable lowercase-kebab-case keys;
  • public maturity statuses are localized;
  • newly created translations retain independent publication histories;
  • generated HTML checks canonical, reciprocal hreflang, locale-switch targets, localized statuses, and submission fallback markup.

Markdown-first and reusable structure

  • public copy and site-facing settings are Markdown-owned;
  • Astro components contain rendering behavior rather than editorial copy;
  • ordinary bilingual pages require Markdown only;
  • missing counterparts, duplicate page keys/slugs, reserved-route collisions, stale navigation, and cross-locale navigation fail the build;
  • public slugs are separated from collection IDs: pages use source-path IDs such as zh/about and en/about;
  • home and thoughts entries are loaded through template-specific typed getters;
  • generated-output traversal uses normalized relative filesystem paths.

Review fixes

Codex review identified two P1 blockers, both fixed:

  1. bilingual content pages with equal public slugs could collide as Astro collection IDs;
  2. HomePage and ThoughtsPage accessed template-specific fields from an insufficiently narrowed union type.

Fix commits:

  • 298a133d — precise template getters, reserved page-key enforcement, and generated-output path correction;
  • 277c5a40 — language-scoped source-path IDs for the pages collection.

Verification

  • Codex confirmed that applying both blocker fixes allows the complete npm run build and verify-head flow to pass;
  • an equivalent reconstruction using Astro 5.18.2, Astro Check 0.9.9, and TypeScript 5.9.3 produced 21 checked files with 0 errors, warnings, or hints, generated 16 static pages, and passed canonical/hreflang/content regression;
  • generateId language scoping and Node 22 recursive output-path calculation were also checked directly.

PR #8, which is stacked on this branch, has been synchronized with the same reviewed baseline.

## Summary Completes the public content of qluna-site while making Markdown the primary editing, page-definition, and site-shell configuration surface. - adds English versions of the two existing notes with independent creation dates and revision histories; - introduces stable `translationKey` pairing for article-level canonical/hreflang metadata; - moves homepage, about, projects, timeline, and thoughts copy into `src/content/pages/**/*.md`; - introduces typed `home`, `thoughts`, and reusable `content` templates; - generates ordinary bilingual pages through `[page].astro`, with locale-specific public slugs paired by stable `pageKey` values; - moves brand, navigation, locale-switch labels, and contact email into `src/content/settings/*.md`; - validates navigation against routes generated for the same locale; - corrects deployment architecture documentation and documents reuse boundaries. No unpublished book completion, product launch, successful production deployment, or commercial availability is claimed. ## Content and SEO safeguards - translated notes use explicit real counterpart URLs for hreflang and language switching; - duplicate translation keys fail the build; - note metadata validates versions, date ordering, and stable lowercase-kebab-case keys; - public maturity statuses are localized; - newly created translations retain independent publication histories; - generated HTML checks canonical, reciprocal hreflang, locale-switch targets, localized statuses, and submission fallback markup. ## Markdown-first and reusable structure - public copy and site-facing settings are Markdown-owned; - Astro components contain rendering behavior rather than editorial copy; - ordinary bilingual pages require Markdown only; - missing counterparts, duplicate page keys/slugs, reserved-route collisions, stale navigation, and cross-locale navigation fail the build; - public slugs are separated from collection IDs: pages use source-path IDs such as `zh/about` and `en/about`; - home and thoughts entries are loaded through template-specific typed getters; - generated-output traversal uses normalized relative filesystem paths. ## Review fixes Codex review identified two P1 blockers, both fixed: 1. bilingual content pages with equal public slugs could collide as Astro collection IDs; 2. HomePage and ThoughtsPage accessed template-specific fields from an insufficiently narrowed union type. Fix commits: - `298a133d` — precise template getters, reserved page-key enforcement, and generated-output path correction; - `277c5a40` — language-scoped source-path IDs for the pages collection. ## Verification - Codex confirmed that applying both blocker fixes allows the complete `npm run build` and `verify-head` flow to pass; - an equivalent reconstruction using Astro 5.18.2, Astro Check 0.9.9, and TypeScript 5.9.3 produced 21 checked files with 0 errors, warnings, or hints, generated 16 static pages, and passed canonical/hreflang/content regression; - `generateId` language scoping and Node 22 recursive output-path calculation were also checked directly. PR #8, which is stacked on this branch, has been synchronized with the same reviewed baseline.
chatgpt left a comment

Self-review completed on head 4468358.

Fixes applied during self-review:

  • made the explicit translated-note altUrl authoritative for head-level hreflang, so paired entries may use different route IDs;
  • added build-time duplicate translationKey rejection and lowercase kebab-case validation;
  • moved translation lookup into a deterministic shared helper instead of selecting the first collection result;
  • corrected overbroad employer/private-experience wording;
  • changed the timeline to describe repository-visible pipeline configuration rather than claiming a proven production release;
  • restored independent publication history for the new English entries (createdAt: 2026-07-16, version 0.1);
  • extended generated-HTML checks to every paired static page and both translated notes, including the visible language-switch target.

Static review is clean and the PR remains mergeable. I could not run npm ci / npm run build locally because the execution container could not resolve the private Forgejo host; CI remains the authoritative build gate. This is a self-review COMMENT, not an independent approval.

Self-review completed on head `4468358`. Fixes applied during self-review: - made the explicit translated-note `altUrl` authoritative for head-level hreflang, so paired entries may use different route IDs; - added build-time duplicate `translationKey` rejection and lowercase kebab-case validation; - moved translation lookup into a deterministic shared helper instead of selecting the first collection result; - corrected overbroad employer/private-experience wording; - changed the timeline to describe repository-visible pipeline configuration rather than claiming a proven production release; - restored independent publication history for the new English entries (`createdAt: 2026-07-16`, version `0.1`); - extended generated-HTML checks to every paired static page and both translated notes, including the visible language-switch target. Static review is clean and the PR remains mergeable. I could not run `npm ci` / `npm run build` locally because the execution container could not resolve the private Forgejo host; CI remains the authoritative build gate. This is a self-review COMMENT, not an independent approval.
chatgpt left a comment

Second self-review completed on head e4dc92528d1891da92111b79e43bbd336d6c4225.

Additional fixes made:

  • BaseLayout.paired is now required, preventing future monolingual pages from silently emitting invalid hreflang metadata;
  • note metadata now enforces trimmed non-empty fields, numeric major.minor versions, lowercase-kebab-case translation keys, and updatedAt >= createdAt;
  • note maturity statuses are rendered with localized public labels;
  • thought links preserve the source topic in both form and email-fallback modes;
  • OrcheText descriptions no longer present an exploratory category as already established;
  • generated-output regression now checks localized status labels and submission fallback markup.

Verification performed from a clean reconstructed workspace using the lockfile dependency set:

  • npm ci --ignore-scripts --no-audit --no-fund: passed;
  • npm run build: passed;
  • Astro diagnostics: 21 files, 0 errors, 0 warnings, 0 hints;
  • static output: 16 pages;
  • canonical/hreflang/language-switch/content regressions: passed;
  • negative tests confirmed that missing paired, invalid versions, and reversed content dates fail the build.

This is an author self-review COMMENT, not an independent approval. No remaining blocker found in this pass.

Second self-review completed on head `e4dc92528d1891da92111b79e43bbd336d6c4225`. Additional fixes made: - `BaseLayout.paired` is now required, preventing future monolingual pages from silently emitting invalid hreflang metadata; - note metadata now enforces trimmed non-empty fields, numeric `major.minor` versions, lowercase-kebab-case translation keys, and `updatedAt >= createdAt`; - note maturity statuses are rendered with localized public labels; - thought links preserve the source topic in both form and email-fallback modes; - OrcheText descriptions no longer present an exploratory category as already established; - generated-output regression now checks localized status labels and submission fallback markup. Verification performed from a clean reconstructed workspace using the lockfile dependency set: - `npm ci --ignore-scripts --no-audit --no-fund`: passed; - `npm run build`: passed; - Astro diagnostics: 21 files, 0 errors, 0 warnings, 0 hints; - static output: 16 pages; - canonical/hreflang/language-switch/content regressions: passed; - negative tests confirmed that missing `paired`, invalid versions, and reversed content dates fail the build. This is an author self-review COMMENT, not an independent approval. No remaining blocker found in this pass.
chatgpt left a comment

Third self-review complete. Public page copy is now Markdown-owned: prose, headings, links, timeline entries, homepage labels, thoughts-form labels/options, fallback copy, and subject prefixes live under src/content/pages/{zh,en}. Route files are thin adapters; reusable Astro components contain rendering behavior only. A real npm run build on the reconstructed latest head passed with 25 files checked (0 errors/warnings/hints), 16 static pages generated, and all canonical/hreflang/content regressions passing. During verification, an unquoted YAML colon in English homepage metadata was caught and fixed. No remaining blocker found in this pass.

Third self-review complete. Public page copy is now Markdown-owned: prose, headings, links, timeline entries, homepage labels, thoughts-form labels/options, fallback copy, and subject prefixes live under `src/content/pages/{zh,en}`. Route files are thin adapters; reusable Astro components contain rendering behavior only. A real `npm run build` on the reconstructed latest head passed with 25 files checked (0 errors/warnings/hints), 16 static pages generated, and all canonical/hreflang/content regressions passing. During verification, an unquoted YAML colon in English homepage metadata was caught and fixed. No remaining blocker found in this pass.
chatgpt left a comment

Fourth self-review completed from the perspective of reusing this repository as a small bilingual-site pattern.

Changes made:

  • ordinary paired pages now use template: content plus Markdown-owned pageKey and locale-specific slug;
  • src/pages/[page].astro and src/pages/en/[page].astro generate those pages automatically;
  • six page-specific route adapters were removed;
  • duplicate page keys, duplicate slugs, missing counterparts, and reserved route collisions now fail the build;
  • generated-output verification automatically checks future hreflang-enabled Markdown pages for target existence and reciprocal links;
  • reuse boundaries and a copy checklist are documented.

No independent approval is claimed. The current container cannot resolve the private Forgejo host, so CI remains the final gate for the latest dynamic-route head.

Fourth self-review completed from the perspective of reusing this repository as a small bilingual-site pattern. Changes made: - ordinary paired pages now use `template: content` plus Markdown-owned `pageKey` and locale-specific `slug`; - `src/pages/[page].astro` and `src/pages/en/[page].astro` generate those pages automatically; - six page-specific route adapters were removed; - duplicate page keys, duplicate slugs, missing counterparts, and reserved route collisions now fail the build; - generated-output verification automatically checks future hreflang-enabled Markdown pages for target existence and reciprocal links; - reuse boundaries and a copy checklist are documented. No independent approval is claimed. The current container cannot resolve the private Forgejo host, so CI remains the final gate for the latest dynamic-route head.
chatgpt left a comment

第三轮自审(可复制模式)完成。新增 Markdown settings collection,将品牌、导航、语言切换和联系邮箱移出 Astro 组件;普通双语内容页已由动态路由从 Markdown 生成;导航路径会在构建期与当前语言实际生成的主页、notes、thoughts 和 content slugs 对照,失效、跨语言或重复路径会直接失败。复制新站点时主要替换 settings/pages/notes Markdown 与部署域名配置,不再需要搜索修改布局或投稿组件中的品牌文案。最新 head 的完整本地构建仍受执行容器无法解析 forgejo.xtrape.com 限制,CI 应作为最终编译与生成输出门禁。

第三轮自审(可复制模式)完成。新增 Markdown settings collection,将品牌、导航、语言切换和联系邮箱移出 Astro 组件;普通双语内容页已由动态路由从 Markdown 生成;导航路径会在构建期与当前语言实际生成的主页、notes、thoughts 和 content slugs 对照,失效、跨语言或重复路径会直接失败。复制新站点时主要替换 settings/pages/notes Markdown 与部署域名配置,不再需要搜索修改布局或投稿组件中的品牌文案。最新 head 的完整本地构建仍受执行容器无法解析 forgejo.xtrape.com 限制,CI 应作为最终编译与生成输出门禁。
Owner

Code review:请求修改

当前版本有两个阻塞合并的问题:

  1. [P1] pages collection 的 ID 在中英文之间冲突src/content.config.ts:50

    glob loader 会优先使用 frontmatter 中的 slug 作为 entry ID,因此 src/content/pages/zh/about.mdsrc/content/pages/en/about.md 都得到 ID about,其中一个会覆盖另一个;projectstimeline 同样受影响。修复下述类型错误后,构建会在静态路由生成阶段失败:

    Duplicate id "about" ... Later items with the same id will overwrite earlier ones.
    Missing English counterpart for pageKey "about"
    

    建议为 pages loader 提供包含语言的唯一 generateId,或采用其他能够保证跨语言唯一的 ID 方案。

  2. [P1] 页面模板联合类型没有被正确收窄src/components/HomePage.astro:13,23src/components/ThoughtsPage.astro:12,15

    当前通过 pageKey 做检查不能排除 template: content 分支,因此访问 latestNotesHeadingthoughtsForm 会触发 TypeScript 错误。原始 PR 执行 npm run build 会直接在 astro check 阶段失败。应按 page.data.template 收窄,或让 getPage 返回与 pageKey 对应的精确类型。

验证结果:原始 PR 构建失败;临时修正类型收窄后暴露 collection ID 冲突;临时修正两项后,完整 npm run buildverify-head 均通过。

因此当前结论为 Request changes / 暂不建议合并

## Code review:请求修改 当前版本有两个阻塞合并的问题: 1. **[P1] `pages` collection 的 ID 在中英文之间冲突**(`src/content.config.ts:50`) `glob` loader 会优先使用 frontmatter 中的 `slug` 作为 entry ID,因此 `src/content/pages/zh/about.md` 和 `src/content/pages/en/about.md` 都得到 ID `about`,其中一个会覆盖另一个;`projects`、`timeline` 同样受影响。修复下述类型错误后,构建会在静态路由生成阶段失败: ```text Duplicate id "about" ... Later items with the same id will overwrite earlier ones. Missing English counterpart for pageKey "about" ``` 建议为 pages loader 提供包含语言的唯一 `generateId`,或采用其他能够保证跨语言唯一的 ID 方案。 2. **[P1] 页面模板联合类型没有被正确收窄**(`src/components/HomePage.astro:13,23`、`src/components/ThoughtsPage.astro:12,15`) 当前通过 `pageKey` 做检查不能排除 `template: content` 分支,因此访问 `latestNotesHeading` 和 `thoughtsForm` 会触发 TypeScript 错误。原始 PR 执行 `npm run build` 会直接在 `astro check` 阶段失败。应按 `page.data.template` 收窄,或让 `getPage` 返回与 pageKey 对应的精确类型。 验证结果:原始 PR 构建失败;临时修正类型收窄后暴露 collection ID 冲突;临时修正两项后,完整 `npm run build` 与 `verify-head` 均通过。 因此当前结论为 **Request changes / 暂不建议合并**。
chatgpt left a comment

已处理 Codex review 的两个 P1 blocker,最新 head 为 277c5a40c0c14735cae02b396fccbf633b19abb4

修复映射:

  1. pages collection ID 冲突277c5a40

    • pages glob loader 现在显式使用源文件相对路径生成 ID;
    • 中英文同一公开 slug 分别得到 zh/abouten/about 等独立 entry ID;
    • slug 只负责公开 URL,不再兼任 collection ID。
  2. 页面模板联合类型未收窄298a133d

    • 新增 getHomePage()getThoughtsPage()
    • getter 按 data.template 做运行期校验并返回精确 entry 类型;
    • HomePage/ThoughtsPage 不再从宽泛联合类型访问模板专属字段;
    • 普通 content 页面禁止使用保留的 home / thoughts pageKey。

额外修复:

  • verify-head.mjs 改用 path.relative() 计算递归生成文件路径,避免 Node 22 Dirent.parentPath 与 dist 尾斜杠差异造成嵌套路径错误。

验证:

  • Codex review 已确认:临时应用两项 blocker 修复后,完整 npm run buildverify-head 均通过;
  • 我方使用相同 Astro 5.18.2 / Astro Check 0.9.9 / TypeScript 5.9.3 重建等价工程复核:Astro check 21 files、0 error / warning / hint;静态构建 16 pages;canonical/hreflang 与生成输出回归通过;
  • generateId 与 Node 22 递归路径计算另做了定向验证。

依赖 PR #7 的 PR #8 已同步同一基线修复(c9b3f8d0),不会继续携带旧实现。

这是修复回执 COMMENT,不作为独立 approval。请基于最新 head 复审。

已处理 Codex review 的两个 P1 blocker,最新 head 为 `277c5a40c0c14735cae02b396fccbf633b19abb4`。 修复映射: 1. **pages collection ID 冲突** — `277c5a40` - pages glob loader 现在显式使用源文件相对路径生成 ID; - 中英文同一公开 slug 分别得到 `zh/about`、`en/about` 等独立 entry ID; - `slug` 只负责公开 URL,不再兼任 collection ID。 2. **页面模板联合类型未收窄** — `298a133d` - 新增 `getHomePage()` 与 `getThoughtsPage()`; - getter 按 `data.template` 做运行期校验并返回精确 entry 类型; - HomePage/ThoughtsPage 不再从宽泛联合类型访问模板专属字段; - 普通 content 页面禁止使用保留的 `home` / `thoughts` pageKey。 额外修复: - `verify-head.mjs` 改用 `path.relative()` 计算递归生成文件路径,避免 Node 22 `Dirent.parentPath` 与 dist 尾斜杠差异造成嵌套路径错误。 验证: - Codex review 已确认:临时应用两项 blocker 修复后,完整 `npm run build` 与 `verify-head` 均通过; - 我方使用相同 Astro 5.18.2 / Astro Check 0.9.9 / TypeScript 5.9.3 重建等价工程复核:Astro check 21 files、0 error / warning / hint;静态构建 16 pages;canonical/hreflang 与生成输出回归通过; - `generateId` 与 Node 22 递归路径计算另做了定向验证。 依赖 PR #7 的 PR #8 已同步同一基线修复(`c9b3f8d0`),不会继续携带旧实现。 这是修复回执 COMMENT,不作为独立 approval。请基于最新 head 复审。
Owner

第二轮 Code Review:通过

复审 head:277c5a40c0c14735cae02b396fccbf633b19abb4

上一轮的两个阻塞问题均已修复:

  • HomePage / ThoughtsPage 现在通过精确的页面获取函数返回已收窄的模板类型,astro check 不再报错;
  • pages collection 现在使用包含语言目录的 entry ID(如 zh/abouten/about),中英文相同 slug 不再互相覆盖。

本轮验证:

  • git diff --check 通过;
  • 全新 worktree 执行 npm ci 成功;
  • npm run build 成功:Astro 类型检查 0 errors / 0 warnings,16 个页面完成静态生成;
  • verify-head 的 canonical、hreflang、语言切换及本地化内容回归检查通过。

本轮未发现新的可执行问题。结论:Approve / 可以合并

## 第二轮 Code Review:通过 复审 head:`277c5a40c0c14735cae02b396fccbf633b19abb4`。 上一轮的两个阻塞问题均已修复: - `HomePage` / `ThoughtsPage` 现在通过精确的页面获取函数返回已收窄的模板类型,`astro check` 不再报错; - `pages` collection 现在使用包含语言目录的 entry ID(如 `zh/about`、`en/about`),中英文相同 slug 不再互相覆盖。 本轮验证: - `git diff --check` 通过; - 全新 worktree 执行 `npm ci` 成功; - `npm run build` 成功:Astro 类型检查 0 errors / 0 warnings,16 个页面完成静态生成; - `verify-head` 的 canonical、hreflang、语言切换及本地化内容回归检查通过。 本轮未发现新的可执行问题。结论:**Approve / 可以合并**。
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
qluna/qluna-site!7
No description provided.