Skip to content

Conversation

@Curtion
Copy link
Contributor

@Curtion Curtion commented Jul 13, 2025

目前功能已经经过了我自己的测试: https://blog.3gxk.net/

修改说明

  1. 更新 @halo-dev/api-client: 为了使用consoleApiClient.storage.attachment.externalTransferAttachment API
  2. 更新@vue/tsconfig: importsNotUsedAsValues已经弃用
  3. 剩下的额外修改都和TypeSctipt报错有关

typecho-data-parser.ts内容由Gemini 2.5 Pro+Roo Code分析Typecho 1.2.1 LTS代码生成, 因此从原理上来说解析备份文件的效果和Typecho相同

此功能AI参与度50%+

现有问题

  1. 迁移页面的UnoCSS 未使用transformerCompileClass功能, 不知为何样式不会生成, 因此没有添加:uno:
  2. 当前迁移附件的方案在modules中实现, 实际或许应该新建一个类似MigrateAttachment的字段并在到use-migrate-task.ts中处理?

迁移需要关注的问题

  1. 如果使用1panel部署, 需要关闭WAF再迁移, 否则大概率会被拦截导致迁移失败
  2. 注意先关闭Halo的通知功能(导入评论时会发起通知)
None

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jul 13, 2025
@f2c-ci-robot f2c-ci-robot bot requested review from JohnNiang and ruibaby July 13, 2025 03:08
@ruibaby
Copy link
Member

ruibaby commented Jul 13, 2025

Nice Work!非常感谢你的贡献。

迁移页面的UnoCSS 未使用transformerCompileClass功能, 不知为何样式不会生成, 因此没有添加:uno:

开启这个主要是因为防止样式污染,之前其实可以不用 transformerCompileClass,直接使用 vue-scoped 即可,但换到 Rsbuild 之后,UnoCSS 还不支持 vue-scoped mode。

目前在编写的时候不用手动添加 :uno:,已经在 eslint 配置添加了 UnoCSS 的规则,在编写完成之后执行一下 pnpm lint 即可。(或许可以加一个 lint-staged

当前迁移附件的方案在modules中实现, 实际或许应该新建一个类似MigrateAttachment的字段并在到use-migrate-task.ts中处理?

意思是单独迁移附件吗?可以展开一下,不过这个应该与当前 PR 的实现无关,可以新建一个 issue 进行讨论。

@f2c-ci-robot f2c-ci-robot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 13, 2025
@ruibaby ruibaby changed the title 支持Typecho博客迁移 Add supports for Typecho migration Jul 13, 2025
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2025
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jul 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit 6094980 into halo-sigs:main Jul 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants