Multiple DGs with 1 vault

Instruction

How to publish to multiple Digital Gardens with just 1 set of local Obsidian vault?

Mechanism

Steps

  1. Better close the Obsidian app first.
  2. Duplicate your .obsidian/plugins/digitalgarden, giving it whatever name you like. (digitalgarden-xxx here for example)
  3. Open the manifest.json in the duplicate, and:
    1. Change the id of this duplicated plugin to digitalgarden-xxx
      So that this is identified by Obsidian as a different and independent plugin!
    2. Give it a different name too. (say 🧡 Digital Garden for XXX 💋 for example)
  4. Open the main.js in the duplicate, and:
    1. Find and replace all instances of dg-publish in the JS file to xxx-publish. (or any frontmatter label you like actually, but I think xxx-publish is easier to remember and manage)
      [Thinking behind] This digitalgarden-xxx plugin will find xxx-publish notes for (un)publishing instead.
    2. Find and replace 2 instances of dg-home to xxx-home
      (do leave that dg-home-link alone!)
      [Thinking behind] This digitalgarden-xxx plugin will use a different home page for your 2nd DG!
    3. 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.
  5. Set up your 2nd DG repo and hosting on GitHub, getting your repo name, Base URL, siteName, and baseTheme strings ready.
  6. Start your Obisidian vault, et voilà! You'll find a new 🧡 Digital Garden for XXX 💋 in the Community Plugins panel.
    1. Enable it! You'll get a separated settings panel of it.
      Fill in the necessary settings of your 2nd DG.
    2. There will be a new button in the left Ribbon of Obsidian window.
  7. Start to add xxx-publish and xxx-home to the notes you want.
    • As for other frontmatters, use those dg-yyy as usual because they are not confined to any DG.
  8. 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.
  9. 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.