@aidenlx/relation-resolver
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

Relation Resolver

Provide API to resolve relations defined in obsidian notes

How to use

Put this in relation.d.ts

import { ChangeInfo, RelationResolverAPI } from "relation-resolver";

declare module "obsidian" {
  interface MetadataCache {
    on(
      name: "relation:changed",
      callback: (info: ChangeInfo, api: RelationResolverAPI) => any,
      ctx?: any,
    ): EventRef;
    on(
      name: "relation:resolved",
      callback: (api: RelationResolverAPI) => any,
      ctx?: any,
    ): EventRef;
  }
  interface App {
    plugins: {
      plugins: {
        [id: string]: any;
        ["relation-resolver"]?: {
          api: RelationResolverAPI;
        };
      };
    };
  }
}

Compatibility

The required API feature is only available for Obsidian v0.9.12+.

Installation

From GitHub

  1. Download the Latest Release from the Releases section of the GitHub Repository
  2. Put files to your vault's plugins folder: <vault>/.obsidian/plugins/relation-resolver
  3. Reload Obsidian
  4. If prompted about Safe Mode, you can disable safe mode and enable the plugin. Otherwise, head to Settings, third-party plugins, make sure safe mode is off and enable the plugin from there.

Note: The .obsidian folder may be hidden. On macOS, you should be able to press Command+Shift+Dot to show the folder in Finder.

From Obsidian

Not yet available

  1. Open Settings > Third-party plugin
  2. Make sure Safe mode is off
  3. Click Browse community plugins
  4. Search for this plugin
  5. Click Install
  6. Once installed, close the community plugins window and the patch is ready to use.

Readme

Keywords

none

Package Sidebar

Install

npm i @aidenlx/relation-resolver

Weekly Downloads

10

Version

0.5.0

License

MIT

Unpacked Size

7.69 kB

Total Files

4

Last publish

Collaborators

  • aidenlx