Create multiple Digital Gardens in a single Obsidian Vault

Sample Obsidian Vault
Sample Obsidian Vault

This is something I learned how to do recently with the Obsidian Digital Garden. It is a pain in the butt when the plugin gets updated but once you set it up the first time it is just annoying in the future. It isn’t hard to do.

Step 1: Clone the Obsidian Digital Garden Plugin

This is easiest to do on your Desktop but as long as you can see your .obsidian/plugins folder you can do this on any device.

Create a new folder named digitalgarden-two or the name of your second garden or whatever. This doesn’t matter, just helps to differentiate the files.

Copy all of the files from the digitalgarden folder to the digitalgarden-two folder so it has the same files.

Step 2: Edit the files

1. data.json file

This file contains all of your application settings for your digital garden. You will want to update your githubRepo to your new GitHub Repo (every Digital Garden needs a separate repo) and the gardenBaseUrl to the new address (from Netlify or Vercel). The prHistory line needs to be deleted. Lastly, the defaultNoteSettings should be set up the way you want them.

2. manifest.json

This file contains the name of the plugin as well as the version and such. I update this so it makes it easier to differentiate which settings I am looking at from within Obsidian.

There are some things to note: the id and name should be similar. I usually just add -two or -name to the end of the id and then the name is usually Digital Garden Two or Digital Garden Name so it is similar but I can easily tell it apart.

LEAVE EVERYTHING ELSE ALONE. There is no reason to touch anything else in this file.

3. main.js

This file contains how the plugin operates so be very careful when updating this file. What I do is I CTRL/CMD + F (on Windows) through the file to find any reference to dg- and the first one is on line 11679 with dg-publish. You will want to change the name (so the plugin does not get confused with files from your original Digital Garden).

For my wiki I use wiki-publish and App Seeker I use dg-publish for example. You can change this to whatever you’d like. Just make sure you find all references to dg-publish and have them match what is written on line 11679. I recommend changing the notices as well that way you get notified correctly if you forget something.

You can also change the dg-pathdg-permalinkdg-metatags and all of the other dg- items but the only 2 that are necessary to change are dg-home and dg-published so it does not get confused with your other Digital Garden.

You can change the icon by finding var seedling = "..." where the ... includes a link to an SVG. You can make new SVGs via Inkscape and replace the ... with your custom SVG code. This will make it easier to find the icon in the sidebar of Obsidian.

Once you are done, save the files.

Step 3: Create a new folder for your new Digital Garden and publish files!

That is all that needs to be done. Just make sure you are using the settings you set up in the previous section. Clicking on them will show “Digital Garden 2 Publication Center” for the new Digital Garden versus just showing “Publication Center” for the original Digital Garden.

It is fairly simple. Now, every time the plugin updates, only the original Digital Garden plugin will update. You will have to manually follow these steps again each time an update happens to make sure that both versions stay up-to-date.

Like I said, it is more annoying than it is difficult.

Now you can have as many Digital Gardens within 1 vault as you would like! Happy Publishing!

Show 1 Comment

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *