Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[new feature] RC 阶段 更新列表 #22

Open
37 tasks done
pengzhanbo opened this issue Dec 23, 2023 · 14 comments
Open
37 tasks done

[new feature] RC 阶段 更新列表 #22

pengzhanbo opened this issue Dec 23, 2023 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@pengzhanbo
Copy link
Owner

pengzhanbo commented Dec 23, 2023

破坏性更新

  • ‼️ 主题包名 @vuepress-plume/vuepress-theme-plume 重命名为 vuepress-theme-plume.
    旧的包将被标记为 Deprecate
  • ‼️ 所有插件名 @vuepress-plume/vuepress-plugin-* 重命名为 @vuepress-plume/plugin-*
    旧的包将被标记为 Deprecate
  • ‼️ 移除代码高亮插件 @vuepress/shiki(build) 和 @vuepress/prismjs(dev) ,使用 @vuepress-plume/plugin-shikiji 实现代码高亮,支持更丰富的功能
  • monorepo 目录结构调整,移除 packages,插件迁移至 plugins/*,主题迁移至 theme

主要更新

  • 新增插件 @vuepress-plume/plugin-shikiji: 使用 shikiji 实现代码高亮
  • 优化 plugin-copy-code 插件,优化 UI,交互体验
  • 为代码提供 行高亮: 新增行、删除行、警告行、错误行、聚焦行 等。
  • 代码块高亮 支持 亮色/暗色 主题切换
  • 优化内容容器样式
  • 优化主题 CSS 变量
  • 新增 文章更新时间、编辑交互、contributors、 页面 prev/next
  • 新增 文章阅读时间
  • 添加 友情链接 页面支持
  • 添加 博客文章 标签页面、归档页面
  • 新增页面打印支持
  • 增强对 多语言配置的支持
  • 博客文章列表页 分页支持
  • 新增本地搜索功能,使用 minisearch 替换官方本地搜索插件
  • 新增 全站加密、部分加密 功能
  • 全新的首页
  • 支持嵌入 PDF
  • 支持嵌入 bilibili、youtube 视频
  • 支持嵌入 图表: chart.js、 ECharts、Mermaid、flowchart 等
  • 支持嵌入 CodePen, JSFiddle, CodeSandbox, Replit
  • 支持 golang, kotlin, rust 在线代码演示
  • 支持 布局插槽
  • 支持 组件覆写
  • 支持 单独的 主题配置文件

优化更新

  • 优化移动端 TOC 交互
  • 新增部分页面文本内容配置选项
  • 优化编写md时运行时注入的插件实现预期的热更新
  • 新增 back-to-top 按钮
  • 优化主题默认配置预设,进一步减少用户不必要的配置项
  • 新增侧边栏图标支持
  • 全站过渡动效优化

试验性功能

其它

  • 文档更新

Tip

欢迎提出您期望的功能,欢迎通过 PR 的方式帮助完善本项目!

@pengzhanbo pengzhanbo added the enhancement New feature or request label Dec 23, 2023
@pengzhanbo pengzhanbo self-assigned this Dec 23, 2023
@pengzhanbo pengzhanbo pinned this issue Dec 23, 2023
This was referenced Dec 23, 2023
Merged
Merged
Merged
Merged
Merged
Merged
@Mister-Hope
Copy link

@vuepress-plume/plugin-shikiji 可以废弃了,我们下个版本会迁移到 shikiji

@pengzhanbo
Copy link
Owner Author

@vuepress-plume/plugin-shikiji 可以废弃了,我们下个版本会迁移到 shikiji

@Mister-Hopeplugin-shiji 仓库有了解到迁移,
期待下个版本发布。目前发现从 shiki 迁移到 shikiji,有几个问题需要解决:

  • line-numbers 行数的计算,在 shikiji 下 不需要剪除最后行 \n
  • code highlight 缺少 attrs, 或者说需要一个可行 attrs 解析方案,以适配如 shikiji 支持的 transformer 如 TwoSlash

@Mister-Hope
Copy link

Mister-Hope commented May 1, 2024

由于你最近提了 PR,我今天上午花了点时间看了一下你的主题,基本是大量移植了 VitePress 主题的样式,以及大量来来自我的文档以及一部分我主题的内容。主题做的很不错,不过有一些内容需要做一些讨论:

吸收不错的点子至上游 ecosystem

  1. 你主题的隐秘文字

    这个东西我主题上也有个很久的issue [Feature Request] 增加类似刮刮乐文字隐藏 vuepress-theme-hope/vuepress-theme-hope#3857 ,搁置了很久,计划在上游的 vuepress-plugin-md-enhance 通过 spoiler 实现,届时你可以考虑直接使用相关功能

  2. 你在 markdown-power 里提供的语法很有趣,我认为可以单独抽离成一个 markdown-it 插件,专注于附加链接或资源,计划在上游的 mdit-plugins 实现。

贡献请求

  1. 我们有计划把当前 VuePress 默认主题改为 @vuepress/theme-legacy,并移植 VitePress 主题作为新的 @vuepress/theme-default。鉴于你已经在自己的主题做了很不错的实现,不知道你是否有时间帮助贡献这一部分更改?⚠️⚠️⚠️⚠️ 尽管这可能意味着你需要付出更多时间,但对于整个社区来讲,工作量应该会变少(因为你已经适配过并比较熟悉 VitePress 默认主题布局)。

  2. 我注意到你对 @vuepress/markdown 提出了 patch 并且你应该在下游进行了一些 hack。我已经打开了 issue https://github.com/vuepress/core/issues/1550, 你可以在这里更详细的说明需要的改进,比如我们如何支持 attrs (甚至将现有的 v-pre 和 line-number 改成属性的格式)。我们可以一起完成这个改进。

    实际上,我长期都认为 @vuepress/markdown 对代码块部分的 hack 太重,只是一直没有空改。

  3. 我看你实现了自己的 copy-code 插件,在上方的描述备注是适配 twoslash,在完成上一个工作之后,欢迎你把需要做的适配贡献回 @vuepress/plugin-copy-code。

  4. 你的主题实现了水印功能,并且较为完整。这个功能我因为时间关系也搁置了好久了(我主题也有个issue [Feature Request] 添加水印预设 vuepress-theme-hope/vuepress-theme-hope#3808 )从文档上看这个功能比较独立,应该可以抽离为一个 @vuepress/plugin-watermark 插件贡献到 ecosystem。如果有空能否协助完成?

  5. 你的主题实现了 Kotlin go 和 rust 的 playground,也许可以 PR 回 vuepress-plugin-md-enhance https://plugin-md-enhance.vuejs.press/guide/code/playground.html#advanced 作为新的预设 (可能需要修改现有格式)

我的时间比较有限,因此比较需要相关帮助。

上游不错的功能建议

  • vuepress-plugin-md-enhance 还新增了 markmap plantuml
  • vuepress-plugin-components 新增了 VidStack
  • 考虑 vuepress-plugin-sass-palette: sass-palette 可以无缝支持 vuepress-plugin-md-enhance 等插件的样式,另外,它的一个重大优点是你可以从已有配置中派生。一个例子是字体颜色和主题色,你可以只自己并让用户配置一个颜色,并自动派生出更浅/更深和不同透明度的相关颜色。

一些问题

  1. 我个人注意到仓库有大量的内容是直接拷贝于我的项目,但我并没有看到你有遵守 MIT 协议。
  2. 我留意到了一些 bug,稍后会以新 issue 的格式提出
  3. 你是否需要 https://theme-plume.vuejs.press 域名?

欢迎逐条回复,也可以新开一个discussion 或通过微信等其他方式进行相关讨论。

@pengzhanbo
Copy link
Owner Author

pengzhanbo commented May 1, 2024

@Mister-Hope

  1. 你主题的隐秘文字
    这个东西我主题上也有个很久的issue [Feature Request] 增加类似刮刮乐文字隐藏 vuepress-theme-hope/vuepress-theme-hope#3857 ,搁置了很久,计划在上游的 vuepress-plugin-md-enhance 通过 spoiler 实现,届时你可以考虑直接使用相关功能

这个功能源于 萌娘百科 上实现的 黑幕 效果,觉得能够增加阅读的趣味性,故在主题中实现了它。

  1. 你在 markdown-power 里提供的语法很有趣,我认为可以单独抽离成一个 markdown-it 插件,专注于附加链接或资源,计划在上游的 mdit-plugins 实现。

markdown-power 插件中 @[]() 语法实际上也是参考的 vuepress 中 导入代码块的 @[code]() 语法,我认为这语法跟嵌入图片 ![]() 的语法很相似,将其作为 嵌入其他资源的语法很容易被接受。

贡献请求

  1. 我们有计划把当前 VuePress 默认主题改为 @vuepress/theme-legacy,并移植 VitePress 主题作为新的 @vuepress/theme-default。鉴于你已经在自己的主题做了很不错的实现,不知道你是否有时间帮助贡献这一部分更改?⚠️⚠️⚠️⚠️ 尽管这可能意味着你需要付出更多时间,但对于整个社区来讲,工作量应该会变少(因为你已经适配过并比较熟悉 VitePress 默认主题布局)。

我可以尝试完成这项工作。

  1. 我注意到你对 @vuepress/markdown 提出了 patch 并且你应该在下游进行了一些 hack。我已经打开了 issue https://github.com/vuepress/core/issues/1550, 你可以在这里更详细的说明需要的改进,比如我们如何支持 attrs (甚至将现有的 v-pre 和 line-number 改成属性的格式)。我们可以一起完成这个改进。
    实际上,我长期都认为 @vuepress/markdown 对代码块部分的 hack 太重,只是一直没有空改。

@vuepress/markdown 中的 codePlugin 确实是对 代码块的 hack 太重了,它被严格限定在了 仅对代码的处理,然而 highlight() 方法又缺失了 原本 markdown-it 关键的 attrs 字符串 参数,这使得包括 twoslash 、 whitespace 等其他功能无法作为某个代码块可选的功能实现。 其它内容我在 #1550 中进行讨论。

  1. 我看你实现了自己的 copy-code 插件,在上方的描述备注是适配 twoslash,在完成上一个工作之后,欢迎你把需要做的适配贡献回 @vuepress/plugin-copy-code。

没有问题。

  1. 你的主题实现了水印功能,并且较为完整。这个功能我因为时间关系也搁置了好久了(我主题也有个issue [Feature Request] 添加水印预设 vuepress-theme-hope/vuepress-theme-hope#3808 )从文档上看这个功能比较独立,应该可以抽离为一个 @vuepress/plugin-watermark 插件贡献到 ecosystem。如果有空能否协助完成?

好的,我完成 #75 后将其 迁移到 ecosystem

  1. 你的主题实现了 Kotlin go 和 rust 的 playground,也许可以 PR 回 vuepress-plugin-md-enhance plugin-md-enhance.vuejs.press/guide/code/playground.html#advanced 作为新的预设 (可能需要修改现有格式)
    我的时间比较有限,因此比较需要相关帮助。

好的,但这一块需要进一步讨论细节,我会在准备这项工作前,先提一个 Feature Request 作为讨论。

上游不错的功能建议

  • vuepress-plugin-md-enhance 还新增了 markmap plantuml

vuepress-plugin-md-enhance 的所有功能都可以在 plume 中使用,但可能需要一些样式上的调整以统一风格。

  • vuepress-plugin-components 新增了 VidStack

我不确定是否需要 VidStack 来实现 音频 和 视频 资源嵌入,一方面是我没有这方面的需要,也没收到相关的功能请求,因此可能会在以后确定需要使用时再增加它。

  • 考虑 vuepress-plugin-sass-palette: sass-palette 可以无缝支持 vuepress-plugin-md-enhance 等插件的样式,另外,它的一个重大优点是你可以从已有配置中派生。一个例子是字体颜色和主题色,你可以只自己并让用户配置一个颜色,并自动派生出更浅/更深和不同透明度的相关颜色。

我会考虑使用它。

一些问题

  1. 我个人注意到仓库有大量的内容是直接拷贝于我的项目,但我并没有看到你有遵守 MIT 协议。

是的,本来在 完成 新的文档后,我将 vuepress-plugin-md-enhance 相关的功能的配置说明都链接到 md-enhance 的站点,但是根据主题的其他用户反馈,发现他们几乎不会去查看,而是直接提出了 issue 或 直接联系我 询问如何使用,甚至还包括 vuepress 的官方文档也不会去查看,因此我不得不 将相关的内容文档迁移过来,整合为一站式的文档。
在过程中忽略了 MIT 协议,我会在后续的更新中补充相关的来源说明。

  1. 你是否需要 theme-plume.vuejs.press 域名?

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

@Mister-Hope
Copy link

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

Give me an ip alias or cname record

@pengzhanbo
Copy link
Owner Author

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

Give me an ip alias or cname record

CNAME vuepress-theme-plume.netlify.app

@Mister-Hope
Copy link

Mister-Hope commented May 4, 2024

@mdit/plugin-spoiler is released, I adjust your original syntax because it breaks table, affect other inline grammar and a little hard to write.

https://mdit-plugins.github.io/spoiler.html

@pengzhanbo
Copy link
Owner Author

@mdit/plugin-spoiler is released, I adjust your original syntax because it breaks table, affect other inline grammar and a little hard to write.

mdit-plugins.github.io/spoiler.html

It's great, the new grammar is indeed better.

@Mister-Hope
Copy link

Mister-Hope commented May 5, 2024

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

Give me an ip alias or cname record

CNAME vuepress-theme-plume.netlify.app

Done

@pengzhanbo
Copy link
Owner Author

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

Give me an ip alias or cname record

CNAME vuepress-theme-plume.netlify.app

Done

image

@Mister-Hope
Copy link

Mister-Hope commented May 6, 2024

theme-plume.vuejs.press 对主题来说确实是个更合适的选择,因此可以的话我期望可以使用这个域名。

Give me an ip alias or cname record

CNAME vuepress-theme-plume.netlify.app

Done

image

Oh, Netlify does not allowed a domain to be served on different accounts. So if you want to use netlify, I may need to help you serve the documentation.

You can contact me through wechat. And I can import your repo and server for you once you release the current netlify subdomain

@meteorlxy
Copy link

你们俩的中文讨论怎么一股子机翻的味道 [doge]

@Mister-Hope
Copy link

你们俩的中文讨论怎么一股子机翻的味道 [doge]

因为所有代码的讨论都是从英文形成思路过来了的,我做理论物理,我写的中文论文也是机翻的味道。你从接触一件事情就是用其他语言的话,你很难不从那个语言出发来思考你要说什么。

@huankong233
Copy link
Contributor

你们俩的中文讨论怎么一股子机翻的味道 [doge]

因为所有代码的讨论都是从英文形成思路过来了的,我做理论物理,我写的中文论文也是机翻的味道。你从接触一件事情就是用其他语言的话,你很难不从那个语言出发来思考你要说什么。

理论物理学博士 [doge]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants