Conversation
d89491e to
de76074
Compare
|
This feature would be greatly appreciated. |
|
I wrote the feature as a special option, but I actually think it should be the default. The title of a note is logically part of the note. |
When this option is enabled, each parsed note will be considered to start with a heading: # Title-of-note even when no such line is present in the source file. The title is inferred based on the filename of the note. This option makes heavily nested note embeds make more sense in the exported document, since it shows which note the embedded content comes from. It loosely matches the behaviour of the mainline Obsidian UI when viewing notes in preview mode.
|
@zoni I have rebased my branch on yours now. I believe this feature makes obsidian-export much more useful for documents that use a lot of embedded notes. Maybe you could let me know what you think? |
|
@jforberg I agree this functionality should become part of obsidian-export. Is it absolutely necessary to implement this in the core parsing logic though? I'm quite certain this could be implemented as a postprocessor instead because the See also https://github.com/zoni/obsidian-export/blob/main/CONTRIBUTING.md#design-principles |
|
@zoni I don't see how that is possible given the current architecture. The postprocessor is fed a single document where all embeds have already been expanded. I can't see any information in the event stream that would mark the start or end of the original documents. It could be possible if the event stream would be extended to include such information. But obsidian-export uses pulldown_cmark::Event type directly so there isn't any easy way to extend it. |
When this option is enabled, each parsed note will be considered to
start with a heading:
Title-of-note
even when no such line is present in the source file. The title is
inferred based on the filename of the note.
This option makes heavily nested note embeds make more sense in the
exported document, since it shows which note the embedded content comes
from. It loosely matches the behaviour of the mainline Obsidian UI when
viewing notes in preview mode.