Repository navigation
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
zrr-website-blog | 7a6f319 | Commit Preview URL Branch Preview URL |
Oct 10 2026, 03:53 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
zrr-website-slides | 7a6f319 | Commit Preview URL Branch Preview URL |
Oct 10 2026, 03:52 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
zrr-website-root | 7a6f319 | Commit Preview URL Branch Preview URL |
Oct 10 2026, 03:54 AM |
morirun
left a comment
There was a problem hiding this comment.
阻塞项:
- 无。
非阻塞:
astro.config.mjs的错误信息使用source.mainFilePath;通过内联内容渲染时 astro-typst 只传mainFileContent,信息会显示为undefined,见行内评论。- 本分支落后
main4 个提交(#81、#87、#88、#89),合入前建议 rebase 后让 CI 重新跑一次。
核对:
- 对照 astro-typst 0.12.4 源码:
cheerio.postprocess只在 SVG 渲染路径调用,编译失败时renderToSVGString_返回空字符串,此处检查能拦住空简历,不影响/data/下走 HTML 目标的文章。 - 将 #82、#83 合并到当前
main后本地执行vp run build:三个站点均通过,博客 109 页;/resume/index.html为 731 KB 并含 SVG;两处前篇链接分别渲染为/posts/egglog-quickstart-01/和/posts/egglog-quickstart-02/。 - 去掉各 CI 的
pull_request.branches: [main]是为了让 stack 中的上层 PR 也能跑校验,符合本 stack 的意图。 - CI 全绿,PR 正文符合模板。
结论:
- Approve。
| postprocess($, source) { | ||
| if ($("svg").length === 0) { | ||
| throw new Error( | ||
| `Typst produced no SVG for ${source.mainFilePath}. Check the compiler diagnostics above.` |
There was a problem hiding this comment.
非阻塞:astro-typst 的 prepareSource 对字符串输入只生成 { mainFileContent },此时 mainFilePath 为 undefined。可改为 source.mainFilePath ?? "inline Typst content",让报错信息总能指向具体来源。
Code Review ✅ Approved🟡 Medium risk · Rejecting Typst output without SVG makes invalid resumes fail builds, while the new all-sites workflow may block PRs on build errors. Fixes broken article links in the Egglog series by correcting relative paths to absolute routes, and adds validation to reject empty resume output when Typst compilation fails, ensuring the build fails rather than generating a zero-byte file. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
|
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: j178/prek-action@v3.0.0 |
| with: | ||
| install-only: true | ||
|
|
||
| - uses: voidzero-dev/setup-vp@v1 |




动机
Egglog 系列第二、三篇的前篇链接使用相对路径,部署后会进入不存在的嵌套文章 URL。简历的 Typst 编译失败时,astro-typst 会返回空字符串,构建仍成功并生成 0 字节的
/resume/index.html。解决方案
/posts/<slug>/路由。验证:锁定依赖安装、
vp check --fix、vp run build、prek run --all-files和提交钩子均通过。向简历临时注入未定义变量时,原版本返回 0 且页面为 0 字节;修复后返回 1,并明确报告缺少 SVG。恢复源文件后完整构建通过,浏览器确认两处链接可访问、简历实际渲染 925 个字形引用,且没有页面脚本异常。说明
Stack 基线:
main;后续为 #83(TypeScript 兼容约束)、#84(离线 OG 字体)、#85(共享规范与 Astro 检查)。CI 对所有 PR 基线分支运行,覆盖上层 stack PR。本地云端验证时已从官方源预热固定版本的 Typst 包缓存;远端完整构建也通过。保留 TypeScript 6.x 和现有依赖版本。负例注入内容在验证后已恢复;简历正文和显示样式保持原样。