Skip to content
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

Recursive export of linked files #38

Open
emdoe opened this issue Feb 13, 2023 · 9 comments
Open

Recursive export of linked files #38

emdoe opened this issue Feb 13, 2023 · 9 comments
Labels
enhancement New feature or request needs planning This feature request is viable but needs revision / discussion before implementation

Comments

@emdoe
Copy link

emdoe commented Feb 13, 2023

For me, it would be awesome (and super helpful) if we could also recursively export web pages from a given file. For example, suppose we have a document named index.md:

# Index
[[sample]]

and sample.md:

# Sample 
some text...

If we export the file index.md, we can get both index.html and sample.html. One conceivable problem is that we might run into a cycle (e.g. the sample.md also contains a link to the index.md). But we can probably just stop the recursion if we come across a file that has been encountered before.

@emdoe emdoe added the enhancement New feature or request label Feb 13, 2023
@KosmosisDire
Copy link
Owner

So you mean when exporting one file, also export all files that that file references, and then all the ones that than file references and so on? This is a good idea, however probably pretty niche. Thanks for the request and it may be implemented in the future.

@emdoe
Copy link
Author

emdoe commented Feb 14, 2023

Yes! Thanks, I might be able to do some research in the future as well.

@KosmosisDire KosmosisDire changed the title Recursive export Recursive export oflinked files Mar 9, 2023
@KosmosisDire KosmosisDire changed the title Recursive export oflinked files Recursive export of linked files Mar 9, 2023
@KosmosisDire KosmosisDire moved this from Todo to Priority To Do in Webpage Export for Obsidian Apr 29, 2023
@KosmosisDire KosmosisDire added the needs planning This feature request is viable but needs revision / discussion before implementation label Aug 8, 2023
@KosmosisDire KosmosisDire moved this from Priority To Do to Future in Webpage Export for Obsidian Sep 25, 2023
@lzilioli
Copy link

lzilioli commented Dec 6, 2023

I, too would really love to see support for this feature.

The obsidian-export package supports this, but is written in Rust and does not support as many Obsidian features as this exporter does (dataview, etc.).

From their README

Using the --start-at argument, you can export just a subset of your vault.

Just thought I would link here in case there is inspiration that can be taken from their code. https://github.com/zoni/obsidian-export

@KosmosisDire
Copy link
Owner

Thanks I do plan to eventually add support for this. But I want to add it in a way that doesn't make the UI confusing, and doesn't hide the feature in a list somewhere.

@lzilioli
Copy link

lzilioli commented Dec 14, 2023

If at all possible, I would also like the ability to store multiple export configurations each with their own --start-at index files and configure multiple destination folders, and run those configurations on demand. I have a few different projects that I'd like to publish as separate digital gardens if possible.

In addition, my index files often contain dataview queries that dynamically produce links to other documents within the vault. Ideally the recursive export could resolve the dataview queries and detect that they link to notes, and include those notes as part of the export.

In an ideal world, I would also love an interface where after the recursive file link resolution is complete, and BEFORE publishing, I am given the opportunity to explicitly choose which of the selected files get included in the final publish. I have seen other export plugins solve that last bit of logic via published: true front matter metadata, and I think that would be a fine solution here as well. Ideally the final publish summary would give me an overview of all linked files, and flag the ones that are not published so that I can go add the publish metadata IFF i wish for them to be included in the public export.

@KosmosisDire
Copy link
Owner

Hi, thanks. All these ideas are good and something I will take into consideration. But they also have the potential to introduce a large amount of complexity into the plugin. I'll think about the best way to add these features.

One possiblity would be that instead of having a separate mode where you export starting at a specific file, there is just a button in the current file selection panel that would select all linked files recursively. This would allow you to then modify the selection how you wanted afterwards. I am also planning to add selection "presets" so you have save certain file selections. I think this should solve all of the things you listed above. Let me know what you think about this solution

Thanks again for the suggestions

@lzilioli
Copy link

lzilioli commented Dec 19, 2023

I like the idea of being able to click an individual file that I consider to be an "Index" and initiate the recursive export from the menu. As long as I can save this configuration for future re-use, and maybe even add a command to "Publish Site Changes for configuration...", dataview notes are detected and included, and I can specify what frontmatter ket to check for treating a note as "published" for the given export, I think this would meet my needs nicely.

Thank you very much for this plugin!

@zdaar
Copy link

zdaar commented May 26, 2024

I also would love this feature

@heimoshuiyu
Copy link

I use a vault to store all my notes. When I wanted to export work-related notes (and other associated notes, with only one-way links, no need for two-way) to a colleague, I immediately realized I needed this feature.

I put all the notes in the root directory, and manually selecting the notes to export from this super long list is really painful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs planning This feature request is viable but needs revision / discussion before implementation
Projects
Development

No branches or pull requests

5 participants