How do I publish my notes with an Internet-friendly graph?
The default graph builder creates a graph with an org-protocol handler which is convenient when you’re working locally but inconvenient when you want to publish your notes for remote access. Likewise, it defaults to displaying the graph in Emacs which has the exact same caveats. This problem is solvable in the following way using org-mode’s native publishing capability:
- configure org-mode to publish your org-roam notes as a project.
- create a function that overrides the default org-protocol link creation function(‘
org-roam-default-link-builder’). - create a hook that’s called at the end of graph creation to copy the generated graph to the appropriate place.
The example code below is used to publish to a local directory where a separate shell script copies the files to the remote site.