I want to create something like a symlink that won’t break Obsidian
I’m looking for a way to make the same file show up in two different locations in the Obsidian folder tree. This is so I can keep my work files in their appropriate folders and include only some of them in a publishing folder.
Things I have tried
I tried MacOS aliases, and it sort of worked. Symlinks didn’t work at all. Obsidian Help recommends strongly against this approach. Symbolic links and junctions
I created a shell note with just a title and an embed link to the original note. This avoids the issues with symlinks and allows me to add YAML specific to the published note. It also adds the note filename above the text and formats as a block quote. Roughly what I want but ugly.
I’m also experimenting with the Webpage HTML export plugin, and it adds a bunch of blank lines to the bottom of the block quote. The plugin is still in development, so I’m not surprised that using a less common feature like an include breaks it.
Is there a way to do this with vanilla Obsidian or a plugin? Or should I just duplicate the note in my publishing folder? I could probably set up an action or template to automate the process.
One option is to use the TagFolder plugin, which displays tags in a tree in the left panel like folders in the file explorer. (This is how the Bear app, which uses tags instead of folders, behaves.)
That way you can put the same file in as many “tag folders” as you want using Obsidian’s standard nested hashtags. Meanwhile, the file will remain in a single folder in your file system and in Obsidian’s core file explorer.
Thanks for the tip! Looks promising, although it doesn’t appear to work quite the way I first thought, and I’ll have to see if I can get it to work with the Webpage HTML plugin. Pretty helpful plugin either way.
I had wondered if I could remove the formatting in CSS. I’ve done a fair bit with stylesheets for Typora, but I haven’t dug into Obsidian themes much. It looks like you’re adding the cssclasses property in YAML, but where does the snippet go?
Cool–thanks. I knew I’d seen references to snippets, but I couldn’t remember where. I’m familiar with the concept—it’s the “cascading” part of “cascading style sheets”.
Cool plugin, but I couldn’t make it work for my purposes.
The plugin seems designed for ad hoc queries on tags–I couldn’t find a way to save queries, unless pinning does that.
The pseudo folders only exist in the plugin’s tree structure, and they aren’t recognized as publishable folders by the Webpage HTML plugin.
The plugin does look really useful if you organize your notes rather than folders or if you wanted to organize notes, say, both by date and topic. If I were to use it regularly, I’d need to learn how to structure my tags and the plugin so that I didn’t see every possible permutation branch—there is so much information that my brain hurt trying to make sense of it. My tags are currently applied too randomly to work well other than with a single tag search.
You can use the Digital Garden plugin to publish your files and you will have control over what you are willing to publish by adding dg-publish: true to the frontmatter of the note.
An index file – you cannot have a Digital Garden without one – will need to be added both dg-publish: true and dg-home: true.
Plugin and setup info:
Template repo:
If this is not the route you’d want to go down on, I reckon some similar property can be used with that other plugin.
Otherwise symlinking back to the same vault in this case I don’t consider a good idea. I do use symlinks for out-of-vault stuff here and there so that many or large files don’t count toward sync/git quota.
It took some experimentation, but I got your approach to work. I didn’t realize until I dug a bit that I had to enable the snippet in settings even after it was loaded (easy fix), and I discovered I was adding the css class to the wrong note (the embedded note, when it needed to be the note it was embedded in). The Webpage HTML plugin still inserts a bunch of space below the embed, but it’s not nearly as apparent without the block quote formatting. I also discovered it inserts white space at the bottom of any published note.
tl;dr It’s not perfect, but I got it to work pretty well and learned some Obsidian CSS in the process.