Open sati-bodhi opened 1 year ago
I came up with this:
;; Publish org-roam nodes with Jekyll.
;; Function to resolve org-roam links.
(defun org2jekyll-roam-link-export (link description format)
"Export a man page link from Org files."
(let ((desc (or description link))
(file (file-name-base (car (org-roam-id-find link)))))
(if (string= format "html")
(format "<a href=\"../%s\">%s</a>" file desc)
(org2jekyll-message "Unknown format %s, only dealing with html" format))))
(org-link-set-parameters "id"
:follow #'org-roam-id-open
:export #'org2jekyll-roam-link-export)
Tested this out on my system and it works flawlessly.
Hello,
Can you please provide the following information?
Thanks in advance.
bug?
This is not exactly a bug, more like a feature request.
M-x org2jekyll-bug-report
Expected behavior
I would like to publish some of my
org-roam
nodes withorg2jekyll
, but it seems that the internal links that take the form[[id:some-alphanumeric-id][/description/]]
do not work out of the box.Actual behavior
Setting
org-publish
:publishing-function
toorg-html-publish-to-html
, the above link resolves to<a href="filename.html#ID-some-alphanumeric-id">
, which doesn't work.What works is:
<a href="../filename">
.Steps to reproduce the behavior
Publish a node in
org-roam
withorg2jekyll-publish
.How can we try and reproduce?
Please your org2jekyll configuration. And the Compile-Log buffer when it's some suspected packaging problem...
Improvments?
The publishing of org-roam nodes should be supported.
What do you want?
A function like
org2jekyll-local-link-export
that resolvesorg-roam
links properly.Why is it better?
Zettels can be published in a blog!
Thanks for sharing!
Cheers,