Skip to content

Commit

Permalink
chore: sync repo v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 1, 2023
1 parent 9a14912 commit 23b0c85
Show file tree
Hide file tree
Showing 143 changed files with 14,947 additions and 180 deletions.
24 changes: 9 additions & 15 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,27 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"plugin:vue/vue3-recommended",
"turbo",
"prettier",
],

parser: "@typescript-eslint/parser",

overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
// Parse the script in `.svelte` as TypeScript by adding the following configuration.
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
// https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},

plugins: ["@typescript-eslint", "prettier"],
plugins: ["@typescript-eslint", "vue", "prettier"],

rules: {
// Note: you must disable the base rule as it can report incorrect errors
semi: "off",
quotes: "off",
"no-undef": "off",
"no-async-promise-executor": "off",
"vue/no-v-htm": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-non-null-assertion": "off",
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ extension
build

# widget
widget
widget
archive.zip
components.d.ts
3 changes: 1 addition & 2 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@
module.exports = {
semi: false,
singleQuote: false,
printWidth: 120,
plugins: ["prettier-plugin-svelte"]
printWidth: 120
}
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# Changelog

## [1.1.1](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.0...v1.1.1) (2023-08-01)
### Bug Fixes
* 修改构建错误 ([0681ebd](https://github.com/terwer/siyuan-plugin-publisher/commit/0681ebd97572f2b6651a37c60e67669b8f9c563b))
## [1.1.0](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.0.0...v1.1.0) (2023-08-01)
### Features
* [#83](https://github.com/terwer/siyuan-plugin-publisher/issues/83) 多平台分发需要考虑同步更新思源笔记 ([103203d](https://github.com/terwer/siyuan-plugin-publisher/commit/103203d3ad867991f0d86909fcb82bcc2f0cd7ad))
* 仓库同步 ([7960387](https://github.com/terwer/siyuan-plugin-publisher/commit/7960387d1d11216d5bd072db4d26735cf277f048))
* 插件挂件源码合并 https://github.com/terwer/sy-post-publisher/issues/89 https://github.com/terwer/siyuan-plugin-publisher/issues/522 ([c18023f](https://github.com/terwer/siyuan-plugin-publisher/commit/c18023f3c9c9a649e1d08a84d89673d29b2a29db))
* 整合挂件功能 ([61c83c7](https://github.com/terwer/siyuan-plugin-publisher/commit/61c83c756c965235eed576a3c6f4e75cee3972f9))
* 新增扩展菜单 ([6fb007d](https://github.com/terwer/siyuan-plugin-publisher/commit/6fb007df7b04ee212065eb2135903e01a2ab5637))
* 修复 cross-fetch 版本问题,必须使用 cross-fetch 3 ([69b33dc](https://github.com/terwer/siyuan-plugin-publisher/commit/69b33dca0f04da05113dab530e03b23d1082c2b8))
* 修复常规发布参数缺失问题 ([e1afcd9](https://github.com/terwer/siyuan-plugin-publisher/commit/e1afcd923fe64fe53e44dd9df43c44ef5e433005))
* 修复构建错误 ([32e8f61](https://github.com/terwer/siyuan-plugin-publisher/commit/32e8f61d193d0a979c4417653bc8b202b0be7b04))
* 修复菜单加载顺序问题导致的可能无法显示的问题 ([de27e0a](https://github.com/terwer/siyuan-plugin-publisher/commit/de27e0a33fe3fa47dd2b9ea497a01aacea164fbc))
* 修复语雀编辑文章可能出错的问题 ([44261c9](https://github.com/terwer/siyuan-plugin-publisher/commit/44261c93fe776836ffa936b32725ae9748527f19))
* 修复语雀预览链接错误问题 ([b9620cb](https://github.com/terwer/siyuan-plugin-publisher/commit/b9620cb10b12d1a39d24cc47d06ed81f232f2013))
* 还原 cross-fetch ([7b26de0](https://github.com/terwer/siyuan-plugin-publisher/commit/7b26de09487866843a1cbca3c9695183cb22e7a9))
### Miscellaneous
* 优化代码构建 ([123a2d2](https://github.com/terwer/siyuan-plugin-publisher/commit/123a2d2013adb19fbfe7a24fbf42893e8fc361f7))
## [1.0.0](https://github.com/terwer/siyuan-plugin-publisher/compare/v0.8.0...v1.0.0) (2023-07-31)
### ⚠ BREAKING CHANGES
* 全面采用插件系统api重构,并进行细节性优化和bug修复,除了菜单插槽移除之外,其他原有功能将完全移植。
### Features
* add publisher hook and bridge ([dc34341](https://github.com/terwer/siyuan-plugin-publisher/commit/dc343414cd1f120a6dde6bf34420ec8c30b42454))
* fix ci ([30982fe](https://github.com/terwer/siyuan-plugin-publisher/commit/30982fe6160805efbcfc1313e716e069e92d37b4))
* **publisher-main:** 加载插件菜单 ([a621fbf](https://github.com/terwer/siyuan-plugin-publisher/commit/a621fbf722cc04f5a18adca71524e33a7b43d4ab))
Expand Down Expand Up @@ -38,7 +56,6 @@
* 版本号同步 ([4192aa1](https://github.com/terwer/siyuan-plugin-publisher/commit/4192aa13c90a839fc3033e8a242c25d61c6cc7cf))
* 移动 sdk 到类库项目 ([e19d45c](https://github.com/terwer/siyuan-plugin-publisher/commit/e19d45c32e4c1933d8597f497658d62d940f9c72))
* 迁移仓库到集市挂件仓库 ([1343906](https://github.com/terwer/siyuan-plugin-publisher/commit/13439061349c43b080cb0c8fa1070e7af3e0b126))
### Bug Fixes
* allow toc in hexo as default ([1650edc](https://github.com/terwer/siyuan-plugin-publisher/commit/1650edc8aaeb6f31eb72a4857bda50124e02d6d6))
* **deps:** bump pnpm/action-setup from 2.2.4 to 2.4.0 ([255b55a](https://github.com/terwer/siyuan-plugin-publisher/commit/255b55a488802c1e738ab4300346851cce749afc))
* **deps:** bump zhi-lib-base from 0.2.6 to 0.4.2 ([f879df2](https://github.com/terwer/siyuan-plugin-publisher/commit/f879df2e00be10709770dbaa172b4d6599ed0fde))
Expand All @@ -56,7 +73,6 @@
* 新增页面路由 ([a8cd654](https://github.com/terwer/siyuan-plugin-publisher/commit/a8cd6543413e8cd8d88bb443e9b915c509b2a470))
* 更新代码校验规则 ([1be577b](https://github.com/terwer/siyuan-plugin-publisher/commit/1be577b8842cc8772e50f3db2820c07b27913e97))
* 项目结构重构 ([1129f3d](https://github.com/terwer/siyuan-plugin-publisher/commit/1129f3d83e5bd297664bbd91e0d083af71ca1719))
### Miscellaneous
* **deps-dev:** bump svelte from 3.59.2 to 4.1.2 ([03393d2](https://github.com/terwer/siyuan-plugin-publisher/commit/03393d2ec1a0373aea298dbfd685dd3e1fec8ff2))
* **deps-dev:** bump vite-plugin-static-copy from 0.16.0 to 0.17.0 ([feea39d](https://github.com/terwer/siyuan-plugin-publisher/commit/feea39d39bff74051fe0d68153b0628b00bff53f))
* **deps-dev:** bump vitest from 0.32.4 to 0.33.0 ([f2ce507](https://github.com/terwer/siyuan-plugin-publisher/commit/f2ce507ea537601d7dba21de84524274ec1cbee4))
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ This plugin promises that the basic functions will be free forever, and the foll
>
> In addition to [Extended Functions], **Other functions do not require any dependencies** , and there is no need to download the previous widget, which is already built-in in the plugin.
## Recent critical updates and bug fixes

- Fixed missing general release parameters
- Fixed an issue where menu loading order issues may not be displayed
- Multi-platform distribution needs to consider synchronizing and updating Siyuan notes
- Fixed an issue where there could be an error in editing articles
- Fixed the wrong issue of Lark Preview link
- Added extended menu
- Warehouse synchronization
- Plug-in widget source code merging

## Core Features

- [X] **Extremely fast release**: One-time configuration, one-click release
Expand Down
145 changes: 100 additions & 45 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,103 @@
[English](README.md)

# sy-post-publisher
# 发布工具

![](https://img1.terwer.space/api/public/202212181125714.png)
![](https://raw.githubusercontent.com/terwer/siyuan-plugin-publisher/main/icon.png)

[思源笔记](https://github.com/siyuan-note/siyuan) 的文章发布到支持的平台的 **思源笔记挂件**
将思源笔记的文章发布到语雀、Cnblogs、WordPress、Typecho、Hexo、Hugo 等平台,支持极速发布、图床管理、平台扩展、智能标签等特色功能。

0.9.0+ 强烈建议配合 [发布工具](https://github.com/terwer/siyuan-plugin-publisher) 插件使用,体验更好哟~
本插件承诺,基础功能永久免费,智能AI相关的后续可能会收费,内测阶段完全免费。如果您想支持开发者,请在这里 [随意打赏](https://github.com/terwer/siyuan-plugin-publisher/blob/main/README_zh_CN.md#捐赠)

0.8.1- 以下版本请查看 [此说明](./README_0_8_1_zh_CN.md)
> 🌹 温馨提示:这个插件是原 `思源笔记发布工具` 挂件的插件升级版,功能包含原有挂件提供的所有功能,同时提供了方便的菜单操作入口,并进行了一系列问题修复和体验优化。
>
> [扩展功能] 外,**其他功能无需任何依赖** ,也无需下载之前的挂件,挂件在插件中已经内置。
## 0.9.0 内测版
## 最近的关键更新与 Bug 修复

注意:此版本以后将配合插件使用。请想好之后再升级。此版本为内测版,目前仅博客园和语雀可用,欢迎提交 issue 和 PR 。
- 修复常规发布参数缺失问题
- 修复菜单加载顺序问题导致的可能无法显示的问题
- 多平台分发需要考虑同步更新思源笔记
- 修复语雀编辑文章可能出错的问题
- 修复语雀预览链接错误问题
- 新增扩展菜单
- 仓库同步
- 插件挂件源码合并

目前已有功能
## 核心特色

- 动态新增平台
- 平台禁用启用
- 平台设置,通过插件菜单 [发布设置] 提供
- 单个发布配合插件,提供友好的插件菜单
- 批量分发,通过插件菜单常规发布提供
- [X] **极速发布**:一次配置,一键发布
- [ ] **图床管理**:集成 PicGO 图床,支持 s3、minio、水印插件
- [X] **支持扩展**:基于统一的博客 API 规范,内置 metaweblogAPI 、 WordPress 、Wechatsync 和 Github 支持,并提供了统一的适配器,理论上可支持扩展到任何平台
- [X] **平台开关**:所有平台均支持启用禁用,默认开启博客园,可随时禁用
- [X] **动态新增**:支持自定义添加平台
- [ ] **智能分类**:支持智能标签、智能 slug 别名、智能摘要,并持续完善中
- [ ] **文章绑定**:支持关联已有的平台文章到思源笔记,方便后续管理,支持思源-> 平台单向同步
- [X] **适应主题**:自动适配暗黑模式与浅色模式
- [X] **语言支持**:多语言支持,支持中文版和英文版
- [ ] **发布视图**:支持多种发布视图,简单模式、详细模式和源码模式
- [X] **多种部署**:支持思源笔记插件<sup>强烈推荐</sup>、Chrome 浏览器扩展、自部署

目前已支持平台
## 平台列表

排名不分先后

- [X] 博客园
- [ ] WordPress
- [X] 语雀
- [ ] Github
- [ ] Hexo
- [ ] Hugo

## 平台适配计划

如果你有想使用的平台,但是此工具目前还没实现,可在这里提交 [思源笔记发布工具插件平台适配跟踪表](https://terwergreen.feishu.cn/share/base/form/shrcnGRdThUiqnhBg15xgclMM0c)
,开发者会考虑列入开发计划中。

平台适配情况请查看请参考 [最新适配情况](https://terwergreen.feishu.cn/share/base/view/shrcnWT2IGIz1r94z9qvqUghDzd)

## 更新历史

请直接查看 [CHANGELOG](./CHANGELOG.md)

## FAQ

* Q1:发布工具插件怎么安装?安装之后在哪里找到他的入口?

A1:找到 **`集市->插件->发布工具`** 下载启用即可。

安装过程无需其他任何操作。这个跟其他插件的下载安装无任何区别。

安装完成后,在顶部右侧工具栏找到 ✈️ 图标,点击菜单,按照对应说明操作使用即可。

* Q2:装了发布工具插件之后,还需要安装挂件吗?

A2:**不需要。**

插件版包含挂件版的所有功能。

后续支持参考 https://github.com/terwer/siyuan-plugin-publisher/blob/main/README_zh_CN.md
* Q3:我不习惯新版操作,想继续使用以前的挂件,可以吗?

A3:**可以但是不推荐。**

**我们强烈推荐您直接使用插件版,因为插件版将是以后长久维护的主要版本,挂架版本已废弃,仅作为修复问题以及兼容历史用户。**

* Q4:我以前是通过 `自定义JS片段 ` 或者 直接添加 `挂件` 来使用的,现在还需要下载该插件吗?

A4:**可选。** 但是我们强烈推荐您删除 JS 片段和挂件,下载插件版使用。

如果您不想使用插件版,那么您无需下载,使用原有 `自定义 JS 片段` 或者 添加 `挂件` 继续使用即可。

如果您想使用插件版,那么我们强烈建议您删除之前添加的 `自定义JS片段``挂件`,直接下载插件版,启用即可。无需其他额外操作。

* Q5:我的历史配置数据项迁移到插件,可以吗?
* A5:**可以。** 注意:数据迁移将在后续版本提供。

请在 `发布设置->检测并迁移历史配置。` 操作。

注意:挂件版配置数据导入仅支持 `sy-p-cfg-v0.8.1.json`

* Q6:我需要发布的平台,发布工具没有提供怎么办?
* A6:参考:[平台适配计划](https://github.com/terwer/siyuan-plugin-publisher/blob/main/README_zh_CN.md#平台适配计划 "平台适配计划")

## 捐赠

Expand All @@ -45,33 +115,18 @@
<img src="https://static-rs-terwer.oss-cn-beijing.aliyuncs.com/donate/alipay.jpg" alt="alipay" style="width:280px;height:375px;" />
</div>

## 版权声明

本作品以 [GPL V3](https://github.com/terwer/sy-post-publisher/blob/main/LICENSE) 形式开源

```
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Terwer designates this
* particular file as subject to the "Classpath" exception as provided
* by Terwer in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
* or visit www.terwer.space if you need additional information or have any
* questions.
*/
```
# 感谢

* 感谢第三方框架对本项目底层的支持

排名不分先后

|Name|version|vendor|
| :---------: | :-----: | :---------: |
|turbo|1.9+|Vercel|
|vite|4.2+|Evan You|
|Svelte|3.57+|Rich Harris|
|TypeScript|5.0+|Microsoft|
|siyuan-note|2.9.0+|D,V|

* 感谢 [leolee9086](https://github.com/leolee9086) 提供的图标资源
37 changes: 30 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siyuan-plugin-publisher",
"version": "1.0.0",
"version": "1.1.1",
"description": "Publishing articles from siyuan-note to platforms such as Yuque, Cnblogs, WordPress, Typecho, Hexo, Hugo and more",
"repository": "terwer/siyuan-plugin-publisher",
"homepage": "https://github.com/terwer/siyuan-plugin-publisher",
Expand All @@ -17,29 +17,52 @@
"syncVersion": "python scripts/version.py",
"parseChangelog": "python scripts/parse_changelog.py",
"prepareRelease": "pnpm syncVersion && pnpm parseChangelog",
"package": "pnpm build && pnpm widgetBuild && pnpm extBuild && pnpm extBuild -t firefox"
"package": "pnpm build && pnpm widgetBuild && pnpm extBuild && pnpm extBuild -t firefox",
"syncWidgetRepo": "python scripts/sync_widget_repo.py"
},
"devDependencies": {
"@terwer/esbuild-config-custom": "^1.0.12",
"@terwer/eslint-config-custom": "^1.3.6",
"@types/node": "18",
"@types/node": "^18.17.1",
"@vitejs/plugin-vue": "^4.2.3",
"esbuild-plugin-copy": "^2.1.1",
"esbuild-style-plugin": "^1.6.2",
"fast-glob": "^3.3.1",
"minimist": "^1.2.8",
"rollup-plugin-livereload": "^2.0.5",
"stylus": "^0.59.0",
"typescript": "^5.1.6",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.4.7",
"vite-plugin-html": "^3.2.0",
"vite-plugin-node-polyfills": "^0.9.0",
"vite-plugin-node-polyfills": "^0.8.2",
"vitest": "^0.33.0",
"vue-tsc": "^1.8.8"
},
"dependencies": {
"siyuan": "^0.7.8",
"@element-plus/icons-vue": "^2.1.0",
"@vueuse/components": "^10.3.0",
"@vueuse/core": "^10.3.0",
"cross-fetch": "^3.1.8",
"element-plus": "^2.3.8",
"js-base64": "^3.7.5",
"pinia": "^2.1.6",
"shorthash2": "^1.0.3",
"simple-xmlrpc": "^1.4.2",
"siyuan": "^0.7.9",
"uuid": "^9.0.0",
"vue": "^3.3.4",
"vue-i18n": "^9.2.2",
"vue-router": "^4.2.4",
"xmlbuilder2": "^3.1.1",
"zhi-blog-api": "^1.20.1",
"zhi-common": "^1.11.5",
"zhi-device": "^2.3.0",
"zhi-fetch-middleware": "^0.1.20",
"zhi-github-middleware": "^0.1.2",
"zhi-lib-base": "^0.4.2",
"zhi-siyuan-api": "^1.28.2"
"zhi-siyuan-api": "^1.29.0",
"zhi-xmlrpc-middleware": "^0.3.0"
}
}
}
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-plugin-publisher",
"author": "terwer",
"url": "https://github.com/terwer/siyuan-plugin-publisher",
"version": "1.0.0",
"version": "1.1.1",
"minAppVersion": "2.9.0",
"backends": [
"windows",
Expand Down
Loading

0 comments on commit 23b0c85

Please sign in to comment.