An Obsidian plugin for suggesting inline links ordered by link count and manual boosts.
Obsidian provides a built-in interface for suggesting files to link to (when typing [[
, for example). Links in this interface are currently based solely on search match. If some files are frequently linked to but are lower in the alphabet than other, less-frequently-linked-to files, this can lead to situations in which a higher-up file are mistakenly chosen over the more-frequently-linked-to file from the list of suggestions when writing quickly. This plugin addresses this situation by suggesting files in order of their incoming links, and further by allowing "boosting" specific files manually.
While typing in a markdown note, typing b[
will bring up a searchable suggestion interface that lists files. This is equivalent to the file-linking interface built into Obsidian core, except that it uses a modifiable sorting approach. Specifically, files are listed by:
- How many times the file is linked to in the Obisidian vault, plus:
- A "boost" score from that file's YAML front-matter (by default, using the key "
boost
"):--- aliases: - Example 1 - Example 2 boost: 100 --- # Example file 1 ...
Within a file, suggestions are listed by aliases in order in which they are listed in the YAML front-matter, followed by the filename.
This allows "boosting" certain files such that they will always be at or near the top of the suggestions list.
Boost score calculations can optionally be shown in the suggestion interface by enabling the "Show scores" setting.
- Copy over
main.js
,styles.css
,manifest.json
to your vaultVaultFolder/.obsidian/plugins/obsidian-boost-link-suggestions/
.
- Search for "Boost Link Suggestions" in Obsidian's community plugins browser
- Enable the plugin in your Obsidian settings (find "Boost Link Suggestions" under "Community plugins").
- Check the "Boost Link Suggestions" settings tab. Add one or more patterns.
Clone the repository, run yarn
to install the dependencies, and run yarn dev
to compile the plugin and watch file changes.
See https://github.com/obsidianmd/obsidian-api for Obsidian's API documentation.
This plugin's code and documentation is released under the BSD 3-Clause License.
Automated tests are not currently included in this code for this repository. Assistance in this, particularly using the Obsidian End-to-End testing approach, is especially welcome!