orgnote-api
v0.19.5
Published
Official API for creating extensions for OrgNote app
Downloads
559
Maintainers
Readme
Table of Contents
- Introduction
- Connected links
- Extension structure
- Publish to official repository
- Extensions example
- Contribute guide
Introduction
This is API for OrgNote extensions.
Warning This API is not stable yet, so it can be changed in the future.
You can find all available methods here. They are currently undocumented.
Connected links
- Built-in extensions
- Type definition for existing extension API
- OrgNote entrypoint
- Official website
- Org Note client
- Repository with collection of extensions
- Typescript abstract syntax tree for org mode.
Extension structure
Folder structure
Compiled extension should be placed in the index.js
file or /dist/index.js
file in the public GIT repository
Extension entrypoint
Each extension should export an object by default with the following structure:
interface Extension {
[key: string]: unknown;
onMounted: (api: OrgNoteApi) => Promise<void>;
onUnmounted?: (api: OrgNoteApi) => Promise<void>;
}
You can find available methods of OrgNoteApi
here
Extension manifest
Also, each extension should export manifest const:
interface ExtensionManifest {
/* Should be unique in the extension repo */
name: string;
version: string;
category: 'theme' | 'extension' | 'language pack' | 'other';
/* OrgNote api semver, 0.13.4 for example */
apiVersion?: string;
author?: string;
description?: string;
keywords?: string[];
// Repository url
sourceType: 'git' | 'file' | 'builtin';
/* Default value is README.org */
readmeFilePath?: string;
/* WIP */
permissions?: Array<'files' | 'personal info' | '*' | 'third party'>;
reloadRequired?: boolean;
sourceUrl?: string;
sponsor?: string[];
development?: boolean;
icon?: string;
}
Extension API
Publish to official repository
OrgNote has an official repository for user-based extensions. You can easily add new recipes/<package>.json
with ExtensionManifest
Extensions example
Themes
UI
Contribute guide
Any contribution is very much appreciated! Please read the style guide before contributing to avoid misunderstandings! I would also appreciate it if you would consider becoming my patron