Skip to content

Commit

Permalink
Merge pull request 'v1.5.0 Releases' (PR#43) from dev into main
Browse files Browse the repository at this point in the history
  • Loading branch information
justice2001 committed Jan 13, 2024
2 parents 31435e5 + 276901f commit f0eb2f3
Show file tree
Hide file tree
Showing 36 changed files with 982 additions and 513 deletions.
4 changes: 4 additions & 0 deletions .gitea/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
version=${{ github.event.release.tag_name }}
version=${version#v}
sed -i "s/version=.*-SNAPSHOT$/version=$version/1" gradle.properties
else
build=${{ github.run_number }}
echo 当前版本的构建号为: $build
sed -i "s/\(version=[0-9]*\.[0-9]*\.[0-9]*\)-SNAPSHOT/\1-build.$build-SNAPSHOT/g" gradle.properties
fi
./gradlew clean build -x test
- name: Archive plugin-starter jar
Expand Down
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# halo-plugin-vditor

---

## NEXT VERSION

- ✨ 使用新的快速插入表单,界面更美观
- ✨ 支持渲染其他插件/主题的自定义组件(需要开发者支持)
- ✨ 允许用户禁用HTML代码块隐藏的特性

---

本插件将Vditor整合进Halo,支持所见即所得编辑模式。 Support English (*Only Editor)!

编辑器支持数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、graphviz 渲染、plantumlUML图
Expand All @@ -16,6 +26,7 @@
- 支持字符计数
- 支持在前台注入渲染脚本(需在设置中开启)
- 更多强大的语法功能请 [->到这<-](https://github.com/Vanessa219/vditor) 查看 (部分功能仍未支持)
- 支持独有的自定义语法,详细语法请参考 [这里](https://github.com/justice2001/vditor-halo-render#语法参考)

## 💻使用方式

Expand All @@ -29,37 +40,31 @@

下面是当前已知的兼容性问题

- 在同时使用ToolBench插件时,数学公式、脑图、图表、流程图、甘特图、时序图、五线谱无法正常渲染。`会尝试修复`
- 在同时使用ToolBench插件时,数学公式、脑图、图表、流程图、甘特图、时序图、五线谱无法正常渲染。`由于此插件修改了页面结构,所以不会修复`
- Vditor渲染器不会根据主题暗色模式进行改变,当前仅支持跟随系统暗色模式

## 📒TODO

> 如果可以支持的功能将会加入到这个TODO列表中,列表中没有的功能也未必是不能支持的,可能只是开发者没有想到
> 插件的进度在 [Gitea](https://git.mczhengyi.top/zhengyi/halo-plugin-vditor/issues) 进行管理,当前Gitea不支持您评论,如果您想讨论Issue可以直接在Github上打开一个Issue并表明要讨论的Gitea Issue,您的回复将会被同步到Gitea。
- [x] 能够在Halo中运行Vditor编辑器
- [x] 支持数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、graphviz 渲染、plantumlUML图
- [x] 添加编辑器默认展示模式设置
- [x] 优化代码命名
- [x] 添加打字机模式
- [x] 支持附件选取插入
- [x] 支持暗色主题渲染
- [ ] `🧪` 支持多媒体渲染
- [x] `💻` 拆分配置为编辑器配置与渲染配置两部分
- [x] `💻` 添加多国语言支持 `手搓翻译函数实现`
- [ ] `💻` 支持代码高亮及复制
- [x] `💻` 跟随主题的暗色模式(joe主题)
- [ ] 将Vditor前台渲染资源全量引入本地
- [ ] 添加配置是否使用CDN加载前台资源
- [ ] `🐛` 内置渲染器与ToolBench不兼容
- [ ] `📄` 自定义暗色模式触发方式
- [ ] `📄` 支持AI编写与修改

**注释**

- `🧪` 当前已在某个版本进行实验性发布
- `📄` 一个想法,如果你有什么比较好的建议可以在ISSUE中提出
- `💻` 计划在下个版本推出
- `🐛` 这是一个BUG,但是比较难处理
- [x] 支持多媒体渲染
- [x] 拆分配置为编辑器配置与渲染配置两部分
- [x] 添加多国语言支持 `手搓翻译函数实现`
- [x] 跟随主题的暗色模式(joe主题)
- [x] 将Vditor前台渲染资源全量引入本地
- [ ] 支持代码高亮及复制
- [ ] 自定义暗色模式触发方式
- [ ] 支持AI编写与修改
- [ ] ~~内置渲染器与ToolBench不兼容~~

## 🙏 鸣谢

Expand Down Expand Up @@ -98,10 +103,18 @@ cd path/to/plugin-starter

```bash
# 下载依赖包

# macOS/Linux执行:
chmod a+x download_dist.sh
./download_dist.sh

# Windows
# 要求安装7Zip并将7Zip的文件夹加入Path环境变量
./download_dist.bat
```



```bash
# macOS / Linux
./gradlew pnpmInstall
Expand Down
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
}

halo {
version = '2.11.3'
superAdminUsername = 'admin'
superAdminPassword = 'admin'
externalUrl = 'http://localhost:8090'
docker {
// windows 默认为 npipe:////./pipe/docker_engine
url = 'npipe:////./pipe/docker_engine'
apiVersion = '1.42'
}
}
3 changes: 2 additions & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"@formkit/vue": "^1.4.0",
"@halo-dev/api-client": "^2.11.0",
"@halo-dev/components": "^1.10.0",
"@halo-dev/console-shared": "^2.11.0",
"@zhengyi/vditor": "3.9.10",
"canvas-confetti": "^1.6.0",
"@zhengyi/vditor": "3.9.9",
"vue": "^3.3.4"
},
"devDependencies": {
Expand Down
103 changes: 99 additions & 4 deletions console/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions console/src/i18n/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const lang: I18nLang = {
title: "Title",
link: "Link",
password: "Password",
quick_insert: "Quick Insert",
};

export default lang;
1 change: 1 addition & 0 deletions console/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const lang: I18nLang = {
title: "标题",
link: "链接",
password: "密码",
quick_insert: "快速插入",
};

export default lang;
1 change: 1 addition & 0 deletions console/src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const lang: I18nLang = {
title: "標題",
link: "鏈接",
password: "密碼",
quick_insert: "快速插入",
};

export default lang;
75 changes: 0 additions & 75 deletions console/src/model/DriveModal.vue

This file was deleted.

Loading

0 comments on commit f0eb2f3

Please sign in to comment.