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

feat: Generate documentation using typedoc #32

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
047fbb3
Plugin 的 i18n 属性可能为一个嵌套的 JSON 对象
Zuoqiu-Yingyi Jun 2, 2023
fcf90bd
Update siyuan.d.ts
Zuoqiu-Yingyi Jun 21, 2023
5efa24f
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Jun 21, 2023
5dc6c16
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Aug 7, 2023
b4e1441
feat: Add plugin event bus `open-siyuan-url`
Zuoqiu-Yingyi Aug 7, 2023
1ca0bf6
feat: Add plugin event bus open-siyuan-url-blocks and `open-siyuan-ur…
Zuoqiu-Yingyi Aug 7, 2023
e1ffb13
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 7, 2023
206c259
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Aug 24, 2023
2465731
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 24, 2023
3a6a52b
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 24, 2023
7def2a2
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 24, 2023
cf8ba76
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 25, 2023
2c01cb5
feat: Add `ICustomModel`, `IDockModel` and `ITabModel`
Zuoqiu-Yingyi Aug 27, 2023
5783a5c
Update siyuan.d.ts
Zuoqiu-Yingyi Aug 27, 2023
d3a21fe
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Sep 14, 2023
d0e9947
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Sep 18, 2023
186773c
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Oct 12, 2023
90370af
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Oct 19, 2023
ea0f923
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Oct 30, 2023
870c04c
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Mar 25, 2024
6ec6d1e
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Apr 26, 2024
dc51798
Merge remote-tracking branch 'upstream/main'
Zuoqiu-Yingyi Jul 6, 2024
64eab2b
style(eslint): Add `eslint` formatting configuration
Zuoqiu-Yingyi Jul 6, 2024
17d21da
style(cspell): Add `cSpell` spelling check configuration
Zuoqiu-Yingyi Jul 6, 2024
78512b5
build(typedoc): Add `typedoc` documentation generation configuration
Zuoqiu-Yingyi Jul 6, 2024
3a119f1
docs: Add documentation
Zuoqiu-Yingyi Jul 6, 2024
265371b
docs: Adjust `typedoc-plugin-markdown` configuration
Zuoqiu-Yingyi Jul 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# REF: https://docs.github.com/zh/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
* text eol=lf
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea/
node_modules/
docs/html/
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pnpm run docs:build
pnpm run docs:format

pnpm run format

git add ./docs

exit 0
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<!-- cSpell:ignore positon -->

# Changelog

## v1.0.3 2024-06
- Add `eslint` formatting configuration
- Add `cSpell` spelling check configuration
- Add `typedoc` documentation generation configuration
- Add documentation
- Adjust `typedoc-plugin-markdown` configuration

## v1.0.2 2024-06-04

Expand Down Expand Up @@ -70,7 +76,7 @@
## 0.8.7 2023-10-24

* [Deprecated `loaded-protyle` use `loaded-protyle-static` instead](https://github.com/siyuan-note/siyuan/issues/9468)
* [Fix event defail for `loaded-protyle`](https://github.com/siyuan-note/petal/pull/18)
* [Fix event defined for `loaded-protyle`](https://github.com/siyuan-note/petal/pull/18)
* [Add plugin event bus `paste`](https://github.com/siyuan-note/siyuan/issues/9452)

## 0.8.6 2023-10-17
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# SiYuan Plugin API

Here is the API declaration of SiYuan Plugin System, usages please refer to [SiYuan plugin sample](https://github.com/siyuan-note/plugin-sample).
Here is the Plugin API declaration of [SiYuan](https://github.com/siyuan-note/siyuan), usages please refer to [SiYuan plugin sample](https://github.com/siyuan-note/plugin-sample).

## Installation

```shell
> npm install siyuan --save-dev
```

## Documentation

Please visit the [petal/docs/markdown at main · siyuan-note/petal](https://github.com/siyuan-note/petal/tree/main/docs/markdown) for comprehensive documentation.
60 changes: 60 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json
version: "0.2"
ignorePaths:
- ./package.json
- ./pnpm-lock.yaml
dictionaryDefinitions: []
dictionaries: []
words:
- AIAPI
- antfu
- backlink
- backlinks
- backmention
- blockicon
- blockref
- breadcrumbmore
- codelang
- dailynoteid
- docinfo
- doctree
- dprint
- editorcontent
- editortitleicon
- exportimg
- exportpdf
- exportword
- fileannotationref
- filetree
- focusfirst
- fontstyles
- FSRS
- fullwidth
- historynoteid
- IAPI
- katex
- Keymap
- Mindmap
- newwindow
- nolist
- noneditableblock
- Pandoc
- pdftheme
- plugintopunpin
- protyle
- rootscroll
- searchasset
- searchdata
- searchkeys
- Setext
- setid
- siyuan
- unchangeid
- unreviewed
- unundo
- webdav
- wechat
ignoreWords: []
ignoreRegExpList:
- \d{14}-[0-9a-z]{7}
import: []
93 changes: 93 additions & 0 deletions docs/markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
**SiYuan Plugin API v1.0.2** • **Docs**

---

# SiYuan Plugin API v1.0.2

## Namespaces

| Namespace | Description |
| ------------------------------------- | ----------- |
| [Config](namespaces/Config/README.md) | - |

## Classes

| Class | Description |
| --------------------------------- | ------------------------------------------------------- |
| [App](classes/App.md) | The context of the SiYuan plugin <br/> 思源插件的上下文 |
| [Constants](classes/Constants.md) | - |
| [Dialog](classes/Dialog.md) | - |
| [EventBus](classes/EventBus.md) | - |
| [EventMenu](classes/EventMenu.md) | - |
| [Lute](classes/Lute.md) | - |
| [Menu](classes/Menu.md) | - |
| [Plugin](classes/Plugin.md) | - |
| [Protyle](classes/Protyle.md) | - |
| [Setting](classes/Setting.md) | - |
| [Toolbar](classes/Toolbar.md) | - |

## Interfaces

| Interface | Description |
| ------------------------------------------------ | ----------- |
| [Global](interfaces/Global.md) | - |
| [I18N](interfaces/I18N.md) | - |
| [ICard](interfaces/ICard.md) | - |
| [ICardData](interfaces/ICardData.md) | - |
| [ICommandOption](interfaces/ICommandOption.md) | - |
| [ICustomModel](interfaces/ICustomModel.md) | - |
| [IDockModel](interfaces/IDockModel.md) | - |
| [IEventBusMap](interfaces/IEventBusMap.md) | - |
| [IGetDocInfo](interfaces/IGetDocInfo.md) | - |
| [IGetTreeStat](interfaces/IGetTreeStat.md) | - |
| [IKeymap](interfaces/IKeymap.md) | - |
| [IKeymapItem](interfaces/IKeymapItem.md) | - |
| [ILuteNode](interfaces/ILuteNode.md) | - |
| [IMenuBaseDetail](interfaces/IMenuBaseDetail.md) | - |
| [IMenuItemOption](interfaces/IMenuItemOption.md) | - |
| [IModel](interfaces/IModel.md) | - |
| [IObject](interfaces/IObject.md) | - |
| [IOperation](interfaces/IOperation.md) | - |
| [IPluginDockTab](interfaces/IPluginDockTab.md) | - |
| [IPosition](interfaces/IPosition.md) | - |
| [IProtyle](interfaces/IProtyle.md) | - |
| [IProtyleOption](interfaces/IProtyleOption.md) | - |
| [ISearchOption](interfaces/ISearchOption.md) | - |
| [ISiyuan](interfaces/ISiyuan.md) | - |
| [ITab](interfaces/ITab.md) | - |
| [ITabModel](interfaces/ITabModel.md) | - |
| [IToolbarItem](interfaces/IToolbarItem.md) | - |
| [IWebSocketData](interfaces/IWebSocketData.md) | - |

## Type Aliases

| Type alias | Description |
| -------------------------------------------------- | ----------- |
| [TAVCol](type-aliases/TAVCol.md) | - |
| [TBackendEnv](type-aliases/TBackendEnv.md) | - |
| [TCardType](type-aliases/TCardType.md) | - |
| [TEditorMode](type-aliases/TEditorMode.md) | - |
| [TEventBus](type-aliases/TEventBus.md) | - |
| [TFrontendEnv](type-aliases/TFrontendEnv.md) | - |
| [TOperation](type-aliases/TOperation.md) | - |
| [TProtyleAction](type-aliases/TProtyleAction.md) | - |
| [TTurnInto](type-aliases/TTurnInto.md) | - |
| [TTurnIntoOne](type-aliases/TTurnIntoOne.md) | - |
| [TTurnIntoOneSub](type-aliases/TTurnIntoOneSub.md) | - |

## Functions

| Function | Description |
| ----------------------------------------------------- | ----------- |
| [adaptHotkey](functions/adaptHotkey.md) | - |
| [confirm](functions/confirm.md) | - |
| [fetchGet](functions/fetchGet.md) | - |
| [fetchPost](functions/fetchPost.md) | - |
| [fetchSyncPost](functions/fetchSyncPost.md) | - |
| [getBackend](functions/getBackend.md) | - |
| [getFrontend](functions/getFrontend.md) | - |
| [lockScreen](functions/lockScreen.md) | - |
| [openMobileFileById](functions/openMobileFileById.md) | - |
| [openTab](functions/openTab.md) | - |
| [openWindow](functions/openWindow.md) | - |
| [showMessage](functions/showMessage.md) | - |
41 changes: 41 additions & 0 deletions docs/markdown/classes/App.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[**SiYuan Plugin API v1.0.2**](../README.md) • **Docs**

---

[SiYuan Plugin API v1.0.2](../README.md) / App

# Class: App

The context of the SiYuan plugin
<br/>
思源插件的上下文

## Constructors

### new App()

> **new App**(): [`App`](App.md)

#### Returns

[`App`](App.md)

## Properties

### appId

> **appId**: `string`

#### Defined in

[siyuan.d.ts:536](https://github.com/siyuan-note/petal/tree/main/siyuan.d.ts#L536)

---

### plugins

> **plugins**: [`Plugin`](Plugin.md)[]

#### Defined in

[siyuan.d.ts:535](https://github.com/siyuan-note/petal/tree/main/siyuan.d.ts#L535)
Loading