Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/val3344/obsidian-update-relative-links
https://github.com/val3344/obsidian-update-relative-links
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/val3344/obsidian-update-relative-links
- Owner: val3344
- License: mit
- Created: 2022-09-20T12:37:04.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-12T09:55:20.000Z (6 months ago)
- Last Synced: 2024-08-02T17:29:55.705Z (3 months ago)
- Language: JavaScript
- Size: 403 KB
- Stars: 27
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-obsidian-zh - val3344/obsidian-update-relative-links
README
# Update Relative Links
[中文](./README_zh.md)
## Plugin function
Obsidian's implementation of the "Automatically update internal links" option is buggy. After the file is moved, only the links to this file will be automatically updated, and the links to other files in this file will not be updated. This plugin is used to solve this problem. There is also a command to batch fix all existing links.
For example, there are two files as follows:
`dirA/fileA`:
````markdown
[fileB](../dirB/fileB.md)
`````dirB/fileB`:
````markdown
[fileA](../dirA/fileA.md)
````After moving `fileA` from `dirA` to `dirB`:
`dirB/fileA`:
````markdown
[fileB](../dirB/fileB.md)
`````dirB/fileB`:
````markdown
[fileA](fileA.md)
````The function of this plugin is to fix `[fileB](../dirB/fileB.md)` in `dirB/fileA` to `[fileB](fileB.md)`.
## Instructions
The plugin contains two functions:
The first function: After the file is moved, the relative path of the link is automatically fixed. Once the plugin is installed and enabled, moving files is triggered automatically, no further action is required.
The second function: batch fix links in all files to relative paths. Open the command palette (the default shortcut is `Ctrl + P`), search for "Update all relative links", and press Enter to execute.
## Plugin restrictions
The `Use [[Wikilinks]]` option must be turned off to use Markdown's link syntax. The point of using relative paths is also to make notes more generic, and if you are also using Wiki Links, there is no need to use relative paths.
## Why use relative paths
One of the great advantages of Obsidian is that the notes are composed entirely of Markdown files, so there is no need to worry about migration. Use relative paths to make notes more versatile. For example, use other Markdown editors to view and edit notes. If you sync your notes with Git, you can also view your notes directly on the web. If you don't use relative paths, links in notes will only be recognized in Obsidian.