Multiple DGs with 1 vault
Instruction
How to publish to multiple Digital Gardens with just 1 set of local Obsidian vault?
Mechanism
- Different
id
in themanifest.json
of a plugin makes it ANOTHER plugin as identified by Obsidian! - Our great Digital Garden plugin of Obsidian by @oleeskild works by the
dg-publish
and 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-xxx
here for example) - Open the
manifest.json
in the duplicate, and:- Change the
id
of this duplicated plugin todigitalgarden-xxx
So that this is identified by Obsidian as a different and independent plugin! - Give it a different
name
too. (say 🧡 Digital Garden for XXX 💋 for example)
- Change the
- Open the
main.js
in the duplicate, and:- Find and replace all instances of
dg-publish
in the JS file toxxx-publish
. (or any frontmatter label you like actually, but I thinkxxx-publish
is easier to remember and manage)
[Thinking behind] This digitalgarden-xxx plugin will findxxx-publish
notes for (un)publishing instead. - Find and replace 2 instances of
dg-home
toxxx-home
(do leave thatdg-home-link
alone!)
[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
repo
name,Base URL
,siteName
, andbaseTheme
strings 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-publish
andxxx-home
to the notes you want.- As for other frontmatters, use those
dg-yyy
as 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.