Using a customisable function for building graph node URLs

Hi there,

I publish my org-roam files to the web.

I wanted to publish my graph to the web too, such that you can click a node and go to the relevant page on the site, but as it is the node links are hardcoded to the protocol links.

I’ve changed it so that org-roam-graph–dot uses a function to build the URL:

I set the function to use in my publish.el here:

It works, but I’m a complete elisp beginner, so I have no clue if this is a good approach - any tips on any better way?

The published graph:


1 Like