Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pjkaufman/obsidian-keyword-handler

An obsidian plugin for managing keywords in the the YAML frontmatter.
https://github.com/pjkaufman/obsidian-keyword-handler

jsdoc obsidian-plugin

Last synced: about 1 month ago
JSON representation

An obsidian plugin for managing keywords in the the YAML frontmatter.

Awesome Lists containing this project

README

        

# Obsidian Keyword Handler

This plugin is a pretty basic keyword handler for my own personal needs to automate a task that I do manually to save me some time. If it is useful for you, feel free to go ahead and use it.

## How it works

The plugin adds a command on load called `Add Keywords to YAML`. This command is an editor command. It does the following:
- Gets the text for the current editor
- Gets the current `keywords` value from the frontmatter if there is one
- Gets all markdown links in the current file from the cached metadata
- Gets the file and then the file metadata cache to check for the `keyword` key's value in the referenced file
- If the keyword has any spaces in it, it has double quotes used to escape the value
- If the keyword does not already exist in the list, it gets added
- Adds the keywords to the frontmatter if the value has changed

## How to use

- Clone this repo.
- Make sure your NodeJS is at least v16 (`node --version`).
- `npm i` or `yarn` to install dependencies.
- `npm run dev` to start compilation in watch mode.

## Manually installing the plugin

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