Skip to content

✨ [Feature]: 将VitePress迁移至最新版 #1879

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
5 tasks done
fu050409 opened this issue Jun 4, 2024 · 0 comments · May be fixed by #1898
Open
5 tasks done

✨ [Feature]: 将VitePress迁移至最新版 #1879

fu050409 opened this issue Jun 4, 2024 · 0 comments · May be fixed by #1898
Assignees
Labels

Comments

@fu050409
Copy link
Collaborator

fu050409 commented Jun 4, 2024

What problem does this feature solve

我们仍在使用一个十分古老的vitepress版本(我们使用v0.20.1但最新版是v1.2.3),当前构建环境中的很多问题都来源于这里,同时低版本的依赖也导致了很多脆弱性。

Originally posted by @fu050409 in #1855 (comment)

我尝试为迁移至最新版本做了一些工作,但是由于版本跨度非常大,所以我意识到这是一个麻烦的工作,我需要考虑API的破坏性变化以及一些依赖的更新。最重要的是,DevUI对VitePress进行了相当大的定制化修改,这相当一部分都不能直接适配新版VitePress(可能是我对于我们进行过的定制化不了解导致不知道如何适配这些定制化?),我们需要一些时间来对它进行适配。

我认为可以打开一个新的分支在其中工作,逐步的将旧版本的VitePress迁移到最新版。

What does the proposed API look like

我们需要进行以下工作:

  • 创建新的VitePress项目并迁移配置文件
  • 迁移vitepress-theme-demoblock至最新版
  • 迁移所有文档至新的VitePress项目
  • 更新DevUI CLI,使其生成的文件适配最新的接口
  • 迁移我们定制化的VitePress样式
@fu050409 fu050409 added the refactoring Refactor code label Jun 7, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
Reasons:
    1. The `demoList` is seems unsupported for latest version of vitepress
    2. The latest `vitepress-theme-demoblock` no longer support for `:::demo <comment>`

Related Issue: DevCloudFE#1879
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
- The latest version of `vitepress-theme-demoblock` does not support `:::demo <comment>
- With `<script setup>` tag, the vitepress will give a 404 error when trying to load the demo code.

Related Issue: DevCloudFE#1879
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
- vite@4 installed instead of vite@5 by virtue of requirements relations
- vitepress@latest is installed
- other updates are safe update

Related Issue: DevCloudFE#1879
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 21, 2024
@fu050409 fu050409 linked a pull request Jun 21, 2024 that will close this issue
@fu050409 fu050409 self-assigned this Jun 25, 2024
fu050409 added a commit to SWPUOpenSource/vue-devui that referenced this issue Jun 30, 2024
- Set `headers: true` in markdown config
- Refactor `useToc` to fit new apis

Related Issue: DevCloudFE#1879
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant