Hi Akash!
Thanks a lot for looking into this. I just briefly applied your code and it seems that I’m always getting a “progn: Wrong number of arguments: (2 . 2), 1” error. I have to admit, that I’m that kind of emacs user that doesn’t speak elisp too much. So I don’t know what could be the problem here. I use org-roam 2.2.2, org-mode 9.6.15 and emacs 29.3, if that helps.
Maybe to state what I’m trying to achieve again: Let’s say I have two org-roam files like this:
:PROPERTIES:
:ID: f55b3540-9647-4b90-9338-6e141a961ccb
:ROAM_REFS: https://org-roam.discourse.group/
:END:
#+title: Org-roam - Org-roam is a Roam replica built on top of the all-powerful Org-mode.
Just some content
and another one referencing the above:
:PROPERTIES:
:ID: c4cb1a78-67f7-44b8-aa9d-44f21e452130
:END:
#+title: org-roam example
This should be a link to the [[id:f55b3540-9647-4b90-9338-6e141a961ccb][org-roam website]]
Now when I export the second one in HTML Format I get:
...
This should be a link to the <a href="org_roam_org_roam_is_a_roam_replica_built_on_top_of_the_all_powerful_org_mode.html#ID-f55b3540-9647-4b90-9338-6e141a961ccb">org-roam website</a>
...
What I would like to see there would be something like:
...
This should be a link to the <a href="https://org-roam.discourse.group">org-roam website</a>
...
Because this is what ROAM_REFS is pointing to and the former does not make any sense in the exported HTML.
I actually want to use this with the ox-hugo exporter, which producing some reference in the MD file, like that:
...
[Org-roam - Org-roam is a Roam replica built on top of the all-powerful Org-mode.]({{< relref "#d41d8c" >}})
## {#d41d8c}
...
Here I would like to see the following instead:
...
[Org-roam - Org-roam is a Roam replica built on top of the all-powerful Org-mode.](https://org-roam.discourse.group)
...
I hope this makes a bit more clearer what I’m trying to achieve. But maybe this is not the right approach at all for this.