Vault
Definition: A vault is a folder where you store your notes and supporting assets (e.g., images).
Comparison with other software
Like Dendron vault
Thorg vault is similar to Dendron Vault.
Unlike Obsidian Vault
However, Obsidian Vault is more akin to Thorg Workspace.
For a folder to be recognized as a vault for a given workspace the following requirements must be met:
- Must be registered in $THORG_WORKSPACE/.thorg/data/workspace_config.json
- Why: So that workspace is aware that we want this folder to be recognized as a vault. This is most useful if you
- Must contain $VAULT/root.md with valid globally unique 'id' in FrontMatter
- Why: So that we can have globally unique identifier for the vault.
vault Id The vault id comes from the 'id' in FrontMatter of the root.md note located directly under your vault folder.
Example
YOUR_WORKSPACE_DIR/YOUR_VAULT_1/root.md
YOUR_WORKSPACE_DIR/YOUR_VAULT_1/root.md contents:
---
id: abc123
---
abc123 is the vault id of YOUR_VAULT_1
The Thorg vault name is simply the name of the folder under your workspace.
To keep things simple, for now there is NO separate name configuration for the vault.
Approaches
Q: What if I have different Git repositories with the same name? A: Clone with different local names.
Example:
Let's say you have two repositories from different users that share the same name:
git@gitlab.com:user-1/public.git
git@gitlab.com:user-2/public.git
Cloning these as-is would create conflicting directory and vault names. To avoid this, assign different names when cloning:
git clone git@gitlab.com:user-1/public.git ./user-1-public
git clone git@gitlab.com:user-2/public.git ./user-2-public
This creates two separate directories and therefore two different vault names:
./user-1-public
./user-2-public
Relationships
- Many to Many:Thorg Workspace
- A vault can be part of multiple workspaces, and a workspace can have multiple vaults. See Common Thorg Workspace Patterns
Highlighted commands
- thorg.vault.register - registers existing vault or creates and registers a new vault with Thorg Workspace.
Children
Backlinks
- Public Repo (with notes.thorg.app content)
- Create New Note
- How to Add GIT Submodule
- Vault
- Thorg Workspace
- Recommendation: One Workspace-Multiple Vaults. Instead of multi-workspace
- $VAULT/root.md
- Common Thorg Workspace Patterns
- Quick Search In Vault-All
- Fully Qualified Link
- Sub Folders in Vault in the Future
- Thorg Workspace Pattern Along with Code
- Thorg Workspace pattern With Team Vault
- When Updated since Can Be Better Than Visited-Since
- $THORG_WORKSPACE/.thorg/data/workspace_config.json