Multiple DGs with 1 vault
Instruction
How to publish to multiple Digital Gardens with just 1 set of local Obsidian vault?
Mechanism
- Different
idin themanifest.jsonof a plugin makes it ANOTHER plugin as identified by Obsidian! - Our great Digital Garden plugin of Obsidian by @oleeskild works by the
dg-publishand other sibling frontmatters of each note in the vault.
Steps
- Better close the Obsidian app first.
- Duplicate your
.obsidian/plugins/digitalgarden, giving it whatever name you like. (digitalgarden-xxxhere for example) - Open the
manifest.jsonin the duplicate, and:- Change the
idof this duplicated plugin todigitalgarden-xxx
So that this is identified by Obsidian as a different and independent plugin! - Give it a different
nametoo. (say 🧡 Digital Garden for XXX 💋 for example)
- Change the
- Open the
main.jsin the duplicate, and:- Find and replace all instances of
dg-publishin the JS file toxxx-publish. (or any frontmatter label you like actually, but I thinkxxx-publishis easier to remember and manage)
[Thinking behind] This digitalgarden-xxx plugin will findxxx-publishnotes for (un)publishing instead. - Find and replace 2 instances of
dg-hometoxxx-home
(do leave thatdg-home-linkalone!)
[Thinking behind] This digitalgarden-xxx plugin will use a different home page for your 2nd DG! - Find 3 or 4 instances of "Digital Garden", and add some necessary identifiers "for XXX" or so, so that the 2nd set of plugin will be more distinguished from the first digitalgarden plugin.
- Find and replace all instances of
- Set up your 2nd DG repo and hosting on GitHub, getting your
reponame,Base URL,siteName, andbaseThemestrings ready. - Start your Obisidian vault, et voilà! You'll find a new 🧡 Digital Garden for XXX 💋 in the Community Plugins panel.
- Enable it! You'll get a separated settings panel of it.
Fill in the necessary settings of your 2nd DG. - There will be a new button in the left Ribbon of Obsidian window.
- Enable it! You'll get a separated settings panel of it.
- Start to add
xxx-publishandxxx-hometo the notes you want.- As for other frontmatters, use those
dg-yyyas usual because they are not confined to any DG.
- As for other frontmatters, use those
- Press the 2nd DG (grass) ribbon button and open this 🧡 Digital Garden for XXX 💋 Publication Center, and you will see a different set of notes ready to be published onto your 2nd DG.
- There will also be a different set of commands in the Command Palette for the 2nd DG. Try them!
So your 2nd DG experience will be as complete as the first one, the 3rd one, and so on.
In the future
If the digitalgarden plugin ever gets updated, you will have to modify main.js and manifest.json of the digitalgarden-xxx plugin again.