feat: initial implementation of backlinks extension

This commit is contained in:
hermes
2026-04-23 13:34:59 +00:00
commit 23bfd2e2e2
4 changed files with 130 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# Obsidian Local REST API — Backlinks Extension
This is an extension for the [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin. It adds a new endpoint to retrieve backlinks for a specific note.
## Features
- **GET `/extensions/backlinks/{filepath}`**: Returns all notes that link to the specified file.
## Installation
1. Install the [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin.
2. Download the `main.js` and `manifest.json` from the `/dist` folder of this repository.
3. Create a folder named `obsidian-local-rest-api-backlinks` in your vault's `.obsidian/plugins/` directory.
4. Place `main.js` and `manifest.json` into that folder.
5. Restart Obsidian or reload plugins.
6. Enable the plugin in **Settings > Community Plugins**.
## Usage Example
```bash
curl -k -H "Authorization: Bearer YOUR_API_KEY" \
"https://127.0.0.1:PORT/extensions/backlinks/MyNote.md"
```
## Development
```bash
npm install
npm run build
```