Commit f892cea2 authored by Neil Mather's avatar Neil Mather
Browse files

testing id links

parent 7b328a06
Pipeline #281168668 passed with stages
in 7 minutes and 35 seconds
......@@ -3,3 +3,4 @@
+ Thinking about [[file:../improving-my-note-taking.org][Improving my note-taking]]. At the moment, I've just jotted down what it is that I currently do as food for thought on where the pain points are.
+ [[file:../ox-agora.org][ox-agora]] continues to be functional, and I am enjoying sharing my content in [[file:../agora.org][Agora]] (https://anagora.org/@neil).
+ A side benefit, or perhaps a full-fledged co-benefit, is that I have my notes always in a Foam-y/Obsidian-y format. I don't foresee myself moving away from org-roam anytime soon, but regardless I do like the idea of having my notes in a more portable format. I mean, org syntax is of course plain-text and readable, but it still has its own lock-ins, of sorts.
+ I note [[https://github.com/jethrokuan/braindump/blob/master/publish.el#L8][here]] Jethro's use of =org-id-extra-files= in his export process. This could help me [[id:20210326T231455.451131][Preparing for org-roam v2]].
#+TITLE: My Spacemacs User Config
#+property: header-args:elisp :tangle ~/.spacemacs.d/user-config.el :comments org
#+LAST_MODIFIED: [2021-04-03 Sat 14:14]
#+LAST_MODIFIED: [2021-04-04 Sun 09:13]
* Preamble
:PROPERTIES:
......@@ -254,7 +254,7 @@ org-roam builds on top of org-mode, but I feel like it deserves it's own section
Because I use export heavily, I'm kind of dependent on file-based links right now (as far as I understand). This is going to be problematic when org-roam v2 rolls around, but cross that bridge when we come to it.
#+begin_src elisp
(setq org-roam-prefer-id-links nil)
(setq org-roam-prefer-id-links t)
#+end_src
*** Prefer immediate DB update method.
......
......@@ -3,7 +3,7 @@
:END:
#+title: Preparing for org-roam v2
#+CREATED: [2021-03-26 Fri 23:08]
#+LAST_MODIFIED: [2021-03-27 Sat 16:20]
#+LAST_MODIFIED: [2021-04-04 Sun 09:24]
A big redesign is on the way for how [[file:org-roam.org][org-roam]] works - lots of discussion [[https://org-roam.discourse.group/t/org-roam-major-redesign/][here]]. The biggest change seems to be a move to use id links rather than file links.
......@@ -59,3 +59,27 @@ and
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 =org-publish-current-file= works.
** [2021-04-04 Sun 09:23]
:PROPERTIES:
:ID: 4c5feffc-bc09-4446-aa34-35bd51486845
:END:
I note [[https://github.com/jethrokuan/braindump/blob/master/publish.el#L8][here]] Jethro's use of =org-id-extra-files= in his export process:
#+begin_src elisp
(let ((org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$")))
(org-hugo-export-wim-to-md))
#+end_src
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: [[id:20210326T232003.148801][org-roam]].
^ This appears to work! During processing, when it hit this id link, =org-publish-project output=
#+begin_quote
1452 files scanned, 9 files contains IDs, and 34 IDs found.
#+end_quote
It took a while. Presumably it would only occur once per publish.
......@@ -21,6 +21,7 @@
(require 'htmlize)
(require 'org-roam)
(require 's)
(require 'find-lisp)
;; Don't create backup files (those ending with ~) during the publish process.
(setq make-backup-files nil)
......@@ -79,6 +80,8 @@
;; this is important - otherwise org-roam--org-roam-file-p doesnt work.
(setq org-roam-directory project-dir)
;; to be able to find id links during publish
(setq org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$"))
(setq org-roam-db-location (concat project-dir "/org-roam.db")))
(defun commonplace/configure-local ()
......@@ -134,7 +137,7 @@
:html-head-extra ,commonplace/head-extra
:html-container "section"
:htmlized-source nil
:auto-sitemap t
;:auto-sitemap t
:exclude "node_modules"
:sitemap-title "Recent changes"
:sitemap-sort-files anti-chronologically
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment