mirror of
https://github.com/runofthemillgeek/swarnam-obsidian.git
synced 2024-11-16 15:30:16 +00:00
A no-frills web playground plugin for Obsidian.
.gitignore | ||
main.ts | ||
manifest.json | ||
package.json | ||
README.md | ||
styles.css | ||
tsconfig.json |
Obsidian Sample Plugin
This is a sample plugin for Obsidian (https://obsidian.md).
This project uses Typescript to provide type checking and documentation. The repo contains the latest plugin API (obsidian.d.ts) in Typescript Definition format, which contains TSDoc comments describing what it does.
Note: The Obsidian API is still in early alpha and is subject to change at any time!
How to use
- Clone this repo.
npm i
oryarn
to install dependenciesnpm run dev
to start compilation in watch mode.
How to install the plugin
- Copy over
main.js
,styles.css
,manifest.json
to your vaultvault/.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 tomain.js
css
(optional) a css file that should be injected. Defaults tostyles.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')
orrequire('electron')
- Must export a default class which extends
CustomPlugin