-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
104 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## 插件开发指南 | ||
|
||
先要确定插件所属的大类,这个是发布工具内置的,需要发布工具内部添加维护,不支持用户自定义。 | ||
目前可用的有 | ||
- 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适配器(不一定有) | ||
|
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,30 @@ | ||
/* | ||
* Copyright (c) 2023, 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. | ||
*/ | ||
|
||
import { CommonWebPlaceholder } from "~/src/adaptors/web/base/commonWebPlaceholder.ts" | ||
|
||
class CsdnPlaceholder extends CommonWebPlaceholder {} | ||
|
||
export { CsdnPlaceholder } |
This file was deleted.
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 was deleted.
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