# Resolving links with org2jekyll

**URL:** <https://org-roam.discourse.group/t/resolving-links-with-org2jekyll/2929>\
**Category:** How To\
**Created:** [January 4, 2023, 6:24am UTC](https://org-roam.discourse.group/t/resolving-links-with-org2jekyll/2929 "2023-01-04T06:24:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainshoots](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@rainshoots](https://org-roam.discourse.group/u/rainshoots)\
**Post date:** [January 4, 2023, 6:24am UTC](https://org-roam.discourse.group/t/resolving-links-with-org2jekyll/2929/1 "2023-01-04T06:24:14Z")

</div>

In case anyone also wishes to publish their zettels with Jekyll, I am working to publish some of my notes with [org2jekyll](https://github.com/ardumont/org2jekyll.git) and here are my findings:

It seems that `org-roam` links do not work when `org2jekyll` publishes the roam node. It’s been noted that `org2jekyll` makes use of `org-publish` functions to complete the task.

Presently, `org-publish` resolves an ordinary `[[file:title.org]]` link to:

`<a href="title.html">link description</a> `

And the org-roam node link to:

`<a href="title.html#ID-some-alpha-numeric-id-123">`

Neither works out of the box.

I use the following set up (in `config.el` of Doom Emacs) to fix the problem.

```auto
;; 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)

```
