Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
lishid committed Oct 26, 2020
1 parent 245339d commit a577988
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ The repo contains the latest plugin API (obsidian.d.ts) in Typescript Definition

- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `vault/.obsidian/plugins/plugin-id/`.

### Plugin structure

`manifest.json`

- `id` the ID of your plugin.
- `name` the display name of your plugin.
- `description` the long description of your plugin.
- `isDesktopOnly` whether your plugin uses NodeJS or Electron APIs.
- `js` (optional) an alternative js entry point. Defaults to `main.js`
- `css` (optional) a css file that should be injected. Defaults to `styles.css`

`main.js`

- This is the main entry point of your plugin.
- Import any Obsidian API using `require('obsidian')`
- Import NodeJS or Electron API using `require('fs')` or `require('electron')`
- Must export a default class which extends `CustomPlugin`

### API Documentation

See https://github.com/obsidianmd/obsidian-api

0 comments on commit a577988

Please sign in to comment.