-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #697 from terwer/dev
feat: #130 支持发布到CSDN
- Loading branch information
Showing
66 changed files
with
1,256 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## 插件开发指南 | ||
|
||
先要确定插件所属的大类,这个是发布工具内置的,需要发布工具内部添加维护,不支持用户自定义。 | ||
目前可用的有 | ||
- Common | ||
- Metaweblog | ||
- Wordpress | ||
- Github | ||
- Gitlab | ||
- Custom | ||
- System | ||
|
||
新增大类的时候需要维护 | ||
- DynamicJsonCfg | ||
- getSubtypeList | ||
- setDynamicJsonCfg | ||
- src/utils/import/pre.ts | ||
|
||
## API授权插件开发指南 | ||
|
||
## 网页授权插件开发指南 | ||
|
||
1. 确定大类。例如:CSDN属于Custom | ||
2. 新建子类别。例如:SubPlatformType加一个Custom_CSDN | ||
3. 注册子类别,需要修改 | ||
- getSubtypeList | ||
- src/utils/import/pre.ts | ||
4. 新增适配器 | ||
网页授权需要再 src/adaptors/web 新建文件。例如 | ||
- csdnWebAdaptor 需要继承 BaseWebApi | ||
- csdnConfig 需要继承 CommonWebConfig | ||
- csdnPlaceholder 需要继承 CommonWebPlaceholder | ||
- useCsdnWeb 定义 const useCsdnWeb = async (key?: string, newCfg?: CsdnConfig) => {} | ||
5. 注册适配器 | ||
适配器 src/adaptors/index.ts getCfg | ||
配置 src/adaptors/index.ts getAdaptor | ||
YAML适配器(不一定有) | ||
6. 开启配置页面 | ||
在 src/components/set/publish/singleplatform/SingleSettingIndex.vue 注册配置 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.