org-roam / org-roam-server

A Web Application to Visualize the Org-Roam Database
MIT License
635 stars 51 forks source link

Add extra-options for the cite-edge as well #147

Closed yaqihou closed 3 years ago

yaqihou commented 3 years ago

First of all, thanks a lot for this awesome project!

Could I suggest one extra custom variable to control the style of cite-edges? It is to be added here with a similar name like org-roam-server-extra-edge-cite-options? To me, such a need arises as I am trying to distinguish the cite edge from the normal links by making cite edges dashed lines.

I would be glad to create a pull request for this if this looks like good customization to have.

tefkah commented 3 years ago

Wow great suggestion! I just quickly implemented it and it works like a charm!

image

I simply added the (cons 'dashes t) line to the dolist

      (dolist (edge edges-cites)
        (let* ((title-source (org-roam--path-to-slug (elt edge 0)))
               (title-target (org-roam--path-to-slug (elt edge 1))))
          (push (remove nil (list (cons 'from title-source)
                                  (cons 'to title-target)
                                  (cons 'arrows org-roam-server-network-arrows)
                                  (cons 'dashes t)))
                (cdr (elt graph 1)))))

I will put together a pull request to define a variable for this. In theory we could also have this be customized even further, but for now the dashes are good enough I think.

yaqihou commented 3 years ago

Related pull requenst merged