[codex] 优化社区前端渲染与 standalone 部署 - #22
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
本 PR 聚焦于社区前端(@mortise/site)与 standalone 模板的 Markdown/代码块渲染能力补齐,并改进 standalone 部署脚本在远端处理 better-sqlite3 原生依赖时的稳定性,降低因 apt 网络问题导致的部署中断风险。
Changes:
- 为社区站点与 standalone 模板启用
@comark/nuxt模块,并扩展 MDC highlight 语言列表。 - 优化
deploy-community-standalone.ps1:远端先验证better-sqlite3native binding 是否可用;失败时再走 apt fallback(含镜像与 timeout)。 - 更新
frontend/pnpm-lock.yaml与@mortise/site依赖以引入@comark/nuxt及其相关依赖。
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/deploy-community-standalone.ps1 | 调整远端 better-sqlite3 修复流程(先验证、后 fallback)以提升部署可靠性。 |
| frontend/templates/standalone/nuxt.config.ts | standalone 模板启用 @comark/nuxt 并扩展代码高亮语言。 |
| frontend/apps/site/nuxt.config.ts | 社区站点启用 @comark/nuxt 并扩展代码高亮语言。 |
| frontend/apps/site/package.json | 为社区站点新增 @comark/nuxt 依赖声明。 |
| frontend/pnpm-lock.yaml | 锁文件更新以纳入 @comark/nuxt 及相关依赖解析结果。 |
Files not reviewed (1)
- frontend/pnpm-lock.yaml: Language not supported
Comment on lines
+234
to
+238
| 'npm install "better-sqlite3@${version}" --omit=dev >/dev/null', | ||
| 'node -e "require(''better-sqlite3'')"', | ||
| 'rm -rf /work/node_modules/better-sqlite3', | ||
| 'cp -a /tmp/sqlitefix/node_modules/better-sqlite3 /work/node_modules/', | ||
| 'SQLITEFIX', |
| extends: layers, | ||
|
|
||
| modules: ['@nuxt/eslint', '@nuxt/ui', '@pinia/nuxt', '@nuxt/content', '@nuxt/image'], | ||
| modules: ['@nuxt/eslint', '@nuxt/ui', '@pinia/nuxt', '@nuxt/content', '@nuxt/image', '@comark/nuxt'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
@comark/nuxt,补齐 Markdown/代码块渲染能力。deploy-community-standalone.ps1的远端better-sqlite3处理:先在node:22-slim中验证产物自带 native binding,能加载就跳过修复;确需修复时读取产物实际版本,并给 apt fallback 增加阿里 Debian 镜像和 timeout。背景
本次社区前端 standalone-root 部署时,远端
node:22-slim内的better-sqlite3修复步骤会因网络/apt 安装卡住而中断。实际上传产物中的better-sqlite3@12.8.0已可在目标运行镜像内加载,所以脚本改为先验证再修复,降低部署风险。规范链接
验证
pnpm --filter @mortise/site typecheckscripts/deploy-community-standalone.ps1git diff --check目标文件无空白错误root@47.100.218.231完成社区前端部署验证:mortise-site/mortise-app均 running 且restartCount=0,https://rymcu.com/、/topics、/collections均返回 200