-
Notifications
You must be signed in to change notification settings - Fork 23
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
Embedded notes are not exported #14
Comments
Hi, what's your expectation? export together? This doesn't seem like a good idea. Notes may be nested in loops. |
It is strongly recommended that you use standard markdown syntax instead of obsidian-extended wiki links. Non-standard markdown parsing requires additional custom development. |
It is natural to expect that contents of exported doc match the one you are exporting, isnt it? You dont expect any markdown code to show up, but the content. Yet the opposite happens. Embedding other notes is a flexible way to compose complex documents (no idea why else would you nest files). Obsidian seems to be aimed at academic research, which usually involves complex content. If exporting fails, it makes little sense to use nesting. Also diminishes its usability for publishing. |
Hi @mokeyish ,
The only condition we need to take care of is that a particular file is not exported multiple times if already exported. ps. I haven't gone through the code base of this repo yet |
@nikhildr22 Hi, which export format that you want to apply this rules? Finding all embeded markdown links just like find all images. here is the code https://github.com/mokeyish/obsidian-enhancing-export/blob/master/lua/markdown.lua |
#14 (comment) Of course, if you are looking for a plugin that can support the export of embedded Notes, you can see this OliverBalfour/obsidian-pandoc#5 But this library and plug-in still cannot be supported! [[Xxx^d83ds]] This type of block reference forming export. according to:OliverBalfour/obsidian-pandoc#23 However, even more, unfortunately, the repo has not been updated for a long time, and the author of the library is very busy according to OliverBalfour/obsidian-pandoc#139, so it is expected to make your own rules and merge with this library. It looks like the best choice. |
Mgmeyers Easy Bake plugin handles this issue without infinite loops:
Source: https://discord.com/channels/686053708261228577/969644355042287717/1143309258675453962 |
I have a quite similar issue. I hope it is not to much off-topic, but I think at the root it is the same issue. For me it is not that much about embedded notes but about other auto-generated content like a dataview which creates a table or the output of the task plugin which shows my completed tasks. From time to time also a embedded note. At the moment the exporter exports the source code of the note, while I assume most people want to export the content they see on the screen in reading mode. No matter what they use to generate it. I don't see the issue of infinite loops. I think for regular users this is hardly a issue because this would also create the same loop within Obsidian and break their note. But I get that a tool like the exporter also want to prevent malicious behaviour by a bad actor. I think this could be addressed by adding a (configurable) max number of links you follow. Similar like tools such as wget which allows you to fetch websites and follow links. |
I have a meta note which is effectively a table of contents for around 20 other notes. I'd like to export all these notes together and set styling with pandoc (the builtin export works ok, but the way it exports themes is not great). I am able to send my links past a linter to format them in standard markdown, but this only creates a link to a place on disk where the original .md files are. Is there any way to export the contents of links inline as if they were in the same note? |
@mrlinuxfish Transclusion is not supported by Pandoc at the moment, but the issue is tracked here (since 2012!): jgm/pandoc#553. There are some scripting workarounds mentioned there that might be viable to implement in Enhancing export. For now, you could give Easy bake together with Pandoc reference list a try. The former enables transclusion exports, and the latter renders citations in the export. |
@FeralFlora Thanks, it looks like Easy bake is exactly what I'm looking for |
Forgive me, I'm not a programmer, but I don't understand the problem. If recursion is a problem, can't you simply not do it? That is, only read embeds in a top level merge document, not on the ones that are embedded? For instance, if I have: Merge Document[[File 1]] And, for some reason, [[File 3]] has a link to [[File 4]], can't that just be ignored? That is, only read embeds in the document the command is run on, not in the embedded files linked from that document. This would be good enough for my needs. |
Check out my repo. I had the same problem and I wrote a Python program to.make the conversions. It's pretty complete, save from more niche functionalities. |
When exporting a note, which contains embedded another note, the embedded note is not rendered.
Instead, only the link is shown:
![[another note]]
The text was updated successfully, but these errors were encountered: