|
|
||
|---|---|---|
| .github/workflows | ||
| src | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .npmrc | ||
| README.md | ||
| esbuild.config.mjs | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
README.md
Obsidian Sample Plugin
This is a modified version of https://github.com/obsidianmd/obsidian-sample-plugin.
Differences from the original sample plugin
*.tsfiles are put in thesrcdirectory- The plugin class definition and settings-related code are separated into
main.tsandsettings.ts - Release GitHub action is already there
- Don't forget to go to
Settings > Actions > General > Workflow permissionsand turn onRead and write permissions
- Don't forget to go to
Usage
- Create a new repository using this template ("Use this template" > "Create a new repository")
- Clone the created repository
- Modify at least the
id&namefields inmanifest.json. - Modify
package.jsonaccordingly. - Run
npm ito install the dependencies - Run
npm run devornpm run buildto compile your plugin
Releasing your plugin
- If you haven't, go to
Settings > Actions > General > Workflow permissionsand turn onRead and write permissions - Bump the version in
manifest.json(andpackage.json) and then commit & push the change git tag -a <version> -m "<version>"git push origin <version>. This triggers the release action.- When the action is completed, go to the release page of your repository. You will find a newly created draft release.
- Release the draft when you're ready.