tldr; I wanted to test-drive a small (graph-view) idea I had before making an official feature request, so I started poking around my local install to make it work. As a result, my graph-view works better for me now than before
I wanted the graph view to adjust the size of nodes based only on the amount of backlinks to that note. Currently, node size is based on outgoing links and backlinks. Here’s how it’s currently working and Google BackRub approach for reference.
After the intitial set up, the workflow is good enough to poke around and test things out quickly.
It works! Yay! My graph-view now renders nodes based on their backlinks only.
Here’s a before and after picture to illustrate with a sample data vault:
Before with default rendering where the “Index Note” has the same size as the “Authority Note”:
…and after editing where only the “Authority Note” has more weight because of its backlinks:
I’m very happy with how it helps me view the graph. When running it against my personal vault, the topography changes for the better for me. Far less noise from index notes. It helps me discover what notes have, over time, become the real “authorities” or important topics in my mind-space. That wasn’t possible before.
Here’s the workflow in detail for MacOs:
- Install development dependencies (MacOS)
# Install asar for extracting and re-packaging app $ brew install npm $ npm install -g asar js-beautify $ cd ~/Library/Application\ Support/obsidian # Note: Your version number may very well differ $ cp obsidian-0.8.2.asar obsidian-0.8.2.asar.bak # Extract source $ asar extract obsidian-0.8.2.asar obsidian-0.8.2 # Beautify obfuscated/minimized js for easier editing $ js-beautify obsidian-0.8.2/app.js -o obsidian-0.8.2/app.js
obsidian-0.8.2/app.jsor other files with an editor of your choice.
- Make the edits you want to make.
- Repackage the app after you’ve made your change:
$ asar pack obsidian-0.8.2 obsidian-0.8.2.asar
- Then, in Obsidian, reload the app with
- Check out how your changes work.
- Rinse and repeat from step 3 to step 6
Note: After updating to a newer version, existing changes will be lost unless you start tracking versions somehow on your own.
Hope this is interesting and still counts as a (maybe even nifty) hack.