Skip to content

The roam-ref protocol

This protocol finds or creates a new note with a given ROAM_REFS:

images/roam-ref

To use this, create the following bookmarklet in your browser:

bash
javascript:location.href =
    'org-protocol://roam-ref?template=r&ref='
    + encodeURIComponent(location.href)
    + '&title='
    + encodeURIComponent(document.title)
    + '&body='
    + encodeURIComponent(window.getSelection())

or as a keybinding in qutebrowser in , using the config.py file (see Configuring qutebrowser):

bash
config.bind("<Ctrl-r>", "open javascript:location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)")

where template is the template key for a template in org-roam-capture-ref-templates (see The Templating System).