I haven’t tried it yet, but the Easy Bake plugin looks promising.
The following information is from the GitHub page (https://github.com/mgmeyers/obsidian-easy-bake):
Links and embeds that exist on their own line will be copied into the compiled document. Inline links will be replaced with the link’s text. This process is recursive, meaning links in linked files will also be copied into the final document.
For example,
## Section One
[[File one]]
[[File two]]
## Section Three
This is an [[File three|inline link]].
[[File four]]
will be compiled to:
## Section One
Content of file one
Content of file two
## Section Three
This is an inline link.
Content of file four
the easy bake plugin is so good, not only of embed note, still for embed block. wonderful!
i dont understand why obsidian don’t add this feature, logseq has a strong export feature, export to md/OPML/HTML/PNG, and with many useful options.
Originally, I planned to simply share the following link: https://stackoverflow.com/questions/40286458/combine-multiple-text-files-and-produce-a-new-single-text-file-using-powershell
However, I was unable to find the link, so I wrote out the following explanation below sharing the script and describing my use and slight modification of it. For now I will leave the explanation here, but am seriously considering deleting it because I fear that someone may do harm to their vault if they try to use it.
THE FOLLOWING SCRIPT SHOULD NOT BE TRUSTED. I am only sharing it for anyone who is already comfortable with this sort of thing and is interested in testing its simple functionality on test files.
Anyways, I have been on a mission to clean up a very unwieldy vault lately. This following process is not recommended for normal use. I modified it slightly so that it worked on markdown files rather than txt files, and so that it creates a markdown separator with the proper syntax.
When I really want to bake things in and clean up a vault or folder, etc., I will use this script to combine the content of notes that I have duplicated to a folder named temp inside my C drive. I run the following script using Powershell. The original. version can be found at the bottom answer of the link above. Here is the modified version:
I like it because it includes the original note name after the separator it adds between the combined notes within the single comp note which is placed on the desktop, named totalresult.md. Since my goal is to whittle down this unwieldy vault into a small number of comp files that can be used as source notes from which any meaningful content can be pulled from, I also use Easy Bake after using this script so that any embedded content from elsewhere in the vault is baked in. To be clear, if you want to maintain live links and embeds, you wouldn’t want to follow what I am doing. My use case is rather extreme.
Hope this helps. Again, be careful, and make sure this is actually something you want to do by testing the script on test files.