Transclusion on export

Not quite the ideal solution but I do enjoy procrastination by writing plugins, so I might add pandoc to it, I currently just use pandoc from the command line.

I wrote a plugin that pulls all transcluded content and internal links into another document - which you can then convert to whatever using pandoc. It also supports nested content, so if your atomic notes has a link to another one, it will just replace that link with it’s content. It only reads your notes and writes to a new file. I’m writing a dissertation and wrote it for myself. I’ve only tested it on Windows 10. Also check the settings, especially whether you want your notes in separate folders or not. I keep everything in one folder but the default on the plugin is a folder called notes. I will fix this, as soon as I’ve written a few more pages of my dissertation.

It doesn’t support block embeds yet - didn’t even know about them when I wrote the plugin.

4 Likes

Thank you, this has the potential of solving many of the problems I have been facing with exporting via Pandoc. It’s great! (I even made an account to make my first post because of you :slight_smile: )
A suggestion: Would it be possible to support links to headings? So if you link to [[note#heading2]] only the content unter heading would get pulled into the manuscript?
At the moment it seems to be quite easy to crash Obsidian (at least I have been able to do so), if you link to a file that has too many links itself because these files link to something else and these files (…) .
Of course, one could and should be careful what one links to on the file that gets compiled, but linking to a heading would be an easy way to use existing files, assuming that you have a pure textblock under a specific heading. (It would then exclude backlinks that are on the file that you link to, under a different heading).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.