Lots of people in the thread seem happy about this. A couple of things that I'm concerned about:
- will this work fine with org-publish?
are you then more dependent on org / org-roam to view these files?
I think things will probably work with org-publish fine, as id links are a long-standing org-mode thing in their own right, not a thing new to org-roam.
The second point bugs me a bit. I sometimes read my private wiki in orgzly / orgro on my phone. I wonder how this will be affected. Also I just like file links as being slightly more software-agnostic.
Hey ho. I'll try using id links for a bit now. They work already in org-roam v1 from what I understand, as well as file links.
Some snippets I'll add to my config:
(setq org-id-link-to-org-use-id t) (setq org-id-method 'ts) (setq org-roam-prefer-id-links t)
(defun ngm/org-hide-properties () "Hide org headline's properties using overlay." (save-excursion (goto-char (point-min)) (while (re-search-forward "^ *:PROPERTIES:\n\\( *:.+?:.*\n\\)+ *:END:\n" nil t) (overlay-put (make-overlay (match-beginning 0) (match-end 0)) 'display "")))) (add-hook 'org-mode-hook #'ngm/org-hide-properties)
Unable to resolve link: "20210326T231455.451131"
during publish in the gitlab pipeline. But weirdly, it's working locally if you do
Here's one thing that might help get things published (via https://github.com/syl20bnr/spacemacs/issues/13387)
Hmm, actually, it also doesn't work locally if I run
make republish rather than org-publish-current-file. Is there a difference between publish current file and publish project?
I wonder if it's something do with relative links. Weird though.
It seems like maybe org-publish just only works with file links for linking between files? https://orgmode.org/manual/Publishing-links.html#Publishing-links However, still confused as to why
I note here Jethro's use of
org-id-extra-files in his export process:
(let ((org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$"))) (org-hugo-export-wim-to-md))
I wonder if this would resolve the issue I was having with org ids and exports? From what I can tell of Jethro's export he does not use org-publish, he loops through his files one-by-one from his Ninja build and calls export on each file from there. But still, I imagine this might help.
Test id link: org-roam.
^ This appears to work! During processing, when it hit this id link,
1452 files scanned, 9 files contains IDs, and 34 IDs found.
It took a while. Presumably it would only occur once per publish.