New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How do we configure org-roam/md-roam so that IDs are compatible with Obsidian? #78
Comments
I feel it depends on the syntax of wiki link that Obsidian uses. According to this part of its documentation, these two are equivalent:
This is different to Markdown-mode and Md-roam. Md-roam supports So... I think, if you do not wish to override code, your options would be the following:
|
Thinking this way, I guess |
My roam-fu is a bit weak; are there any negative consequences to dropping the ID slug from the filename? |
What does “roam-fu” mean? Org-roam and Md-roam don’t use file names for backlinks and other functions, if that’s what you are concerned with. |
@smallstepman Thank you. Now I know what it means |
using doom: (use-package! org-roam
:after org
:config
(setq org-roam-directory "/path/to/valut")
(setq org-roam-dailies-directory "Journal/")
)
(use-package! md-roam
:after org-roam
:config
(set-company-backend! 'markdown-mode 'company-capf) ; add company-capf as company backend in markdown buffers
(setq org-roam-file-extensions '("org" "md")) ; enable Org-roam for a markdown files
(md-roam-mode 1) ; md-roam-mode needs to be active before org-roam-db-sync
(org-roam-db-autosync-mode 1)
(map! :map doom-leader-map
"n r o" (λ! (let* ((full-path (buffer-file-name))
(pattern "/MY\\.VAULT/\\(.*?\\)\\.md$")
(vault-name "MY.VAULT")
obsidian-uri match)
(when (and full-path (string-match pattern full-path))
(setq match (match-string 1 full-path))
(setq obsidian-uri (format "obsidian://open?vault=%s&file=%s" vault-name match))
(start-process "open-obsidian" nil "open" obsidian-uri)))))
)
since obsidian doesnt store id of the files in frontmatter by default, you will also have to add some plugins to obsidian to generate unique ID for all files in your valut, I had success with combinations of these two:
once you do this, all your obsidian files will be available via I did try to also integrate https://github.com/licht1stein/obsidian.el but it was too slow for me (see issue number 39) |
As it sits right now, it looks like md-roam does a good job of finding articles by title when using the
[[wiki-style-links]]
but if you open the same file in Obsidian, it tries to create a new top level file without the org-roam ID prefix.As an example, I have a top level node with ID=
20230318085827
and title "PyCascades". My roam template does this:So, the file name for this node would be
20230318085827-pycascades.md
.Obsidian, though, expects the node ID not to be in the filename. Is this something I should drop? Is it worth adding a section in the docs for compatibility with solutions like Obsidian? I suspect that what I need to do is to change my file name to
${title}.md
alone; is that reasonable?The text was updated successfully, but these errors were encountered: