Roam Export Notes
Note on trying to export my org-roam notes. It's hard.
-
I use eleventy with markdown, with YAML front matter for my blog though I suppose I don't need to use that for the roam site.
-
There are a few ways to convert org to markdown, but none of them handle the front matter correctly.
-
The one exception appears to be ox-hugo, which outputs the front matter I want, but it's hugo specific. In particular, the id based org links are converted to relref shortcodes (a hugo thing).
-
However, it's pretty trivial to convert the relref instances to the right format with regular expressions. For example, sed will do it fairly easily.
-
I would like to use Makefile to pick only the files that need exporting. The problem is that Makefile will run the export command in a new command each time. You can do this with batch emacs but...
-
The problem is the actual org id link conversion for each file you want to export. It requires a hash of id to file, which would usually be in memory, but won't be if you're running each export in a new process. Hence all the files are scanned EVERY time. Very slow.
-
THEREFORE, we have to figure out which files need exporting as part of one big batch export command. We have to bake the incremental build functionality into the function itself.