Open gerroon opened 10 months ago
if you are still looking for relative path for this I needed it for my vault and got it working well enough. Here is the changes to the main.ts file in the .obsidian/plugins folder
replace: settings.path = (0, import_obsidian2.normalizePath)(settingsSrc.path);
with: const currentFilePath = this.app.workspace.getActiveFile().path; const currentDir = currentFilePath.substring(0, currentFilePath.lastIndexOf('/')); settings.path = import_obsidian2.normalizePath(currentDir + "/" + settingsSrc.path);
Once that's added to the .js what do you put for the path in the data block in your Obsidian file? I tried . and currentDir/currentFilePath.
Why not do a pull request? That would be very nice addition.
Once that's added to the .js what do you put for the path in the data block in your Obsidian file? I tried . and currentDir/currentFilePath.
After I put that in the main.js I use paths like this: If you just want to display images in the same dir "path: /" if you want to display images in a dir in the same dir as the note "path: /dir1"
I also took all the plugin files and edited them myself to make a sort of "custom" plugin lol. Dont know if that is required.
Why not do a pull request? That would be very nice addition.
I just wanted to share my findings to help out. Just doing the bare minimum atm lol. Feel free to take my tiny changes and create a more organized way of sharing them.
Hi
It would be very helpful if it accepts relative (to the current note) path, the absolute path makes it a right requirement.
Maybe something like this
->folder -->assets -->gallery.md
gallery.md