Private and shared vaults
Rationale
You want to use Dendron for personal and professional use, keeping some notes private, while sharing others with other team members (or even yourself! -i.e. different machines). Some of these notes, in turn, may be published, whereas others, not.
Some specific use cases in which following a Multi Vault Setup strategy would be recommended are:
- for sensitive notes, multi-vault enables local only vaults vs vaults that can be synced on file sharing services like Dropbox
- for modularizing knowledge, multi-vault enables users to mix and match existing vaults depending on context
- for federating and curating knowledge, multi-vault enables users to publish/subscribe to public vaults using protocols like
git
- for access control, multi-vault lets users configure specific vaults to be private which turns off publication and sharing of any notes inside said vault
Overview
Create a blank worspace that will have multiple vaults, each serving different purposes and audiences. Each vault can be independent git repositories that can be shared with others as you would with a regular git repository. The workspace, itself, can also be a git repository.
Step by step
Start from scratch
-
Create a bare workspace. This workspace will be blank and contain all the needeed vaults as well as the templates and configurations.
From WorkspaceGo to text →Bare Workspace
A bare workspace is a workspace where all vaults inside are remote vaults (separate git repos). You can have a bare code workspace or a bare native workspace.
- Run
Dendron: Initialize Workspace
command. - Type the location where you want it to be stored
- Select
blank
- Run
-
Add as many Vaults as needed, each one serving different purposes or audiences.
- Create a local vault for notes that will not be shared (more info here):
- Run
Dendron: Vault Add
- Select
local
- Type the location where you want it to be stored
- Type the name of the vault (can be different from the folder's name)
- Run
- Add a remote vault for notes that will be shared (either with yourself or with others). You can clone a remote vault or create a local vault that you convert into a remote one:
- If adding remote vault(s) that already exist:
- Run
Dendron: Vault Add
- Select
remote
- Write the git location of the remote vault you want to clone
- The vault will be cloned inside your workspace
- Run
- If converting local vault(s) into remote vault(s):
- Run
Dendron: Convert Vault
- Select the name of your local vault that you want to convert
- Select
Convert to remote vault
- Type the git location where you want to store your remote vault
- Run
- If adding remote vault(s) that already exist:
- Create a local vault for notes that will not be shared (more info here):
-
Create notes in the desired vault using the demo.lookup (Private) tool.
From Multi Vault SetupGo to text →Lookup
Lookup supports multiple vaults. When using lookup to find a note, each search result is labeled with which vault it belongs to.
Vault Location when Creating a Note
When creating a note in lookup, Dendron will try to create your note in the correct vault. By default, it will place the note into the same vault as the currently opened note. But if it detects that the new note matches an existing hierarchy in a different vault, you will get prompted to pick the destination vault:
-
Synchronize notes by running
Dendron: Worskpace sync
From WorkspaceGo to text →Syncing your workspace with Git
Workspace Sync
does not sync the workspace if all your vaults are separate git repos. In order to synchronize your workspace, you need to explicitly do agit pull
from the workspace folder.If you are inside VS Code, you should be able to run
> Create Integrated Terminal...
, choose the folder containing your workspace, and launch the terminal. After launching, run agit pull
inside of it.
Use template
Alternatively, you can use this template from the Teams page:
Workspace
We recommend getting started by using the example in our GitHub template.
This will create a workspace with the following structure
.
└── workspace
├── org-private
│ └── notes
│ └── ...
├── org-public
│ └── notes
│ └── ...
└── org-dev
└── notes
└── ...
Vaults
main
- org-private:
- for company private notes (eg. roadmap, projects, meetings)
- org-public:
- for public notes (eg. wiki, blog, faq)
- org-dev:
- for developer related notes (eg. coding guidelines, docs, rfcs)
Acknowledgement
This guide is based on this gist