Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
Last active November 23, 2022 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScriptAutomate/df23bf3cedf9ba8775c0b53da6adefd0 to your computer and use it in GitHub Desktop.
Save ScriptAutomate/df23bf3cedf9ba8775c0b53da6adefd0 to your computer and use it in GitHub Desktop.
Preferred way of working with multi-vault, self contained vault workflows. Inlcudes explanation of multi-vault layout with self contained vaults.
dev:
enablePreviewV2: true
# Ensure selfcontainedvaults enabled
enableSelfContainedVaults: true
enableExportPodV2: true
commands:
lookup:
note:
# Enables vaultSelectionModeOnCreate
# https://wiki.dendron.so/notes/F9LWJEjscrGkxnYi2JNby/#confirmvaultoncreate
confirmVaultOnCreate: true
# This ensures you always get to confirm what vault
# a note is being created in
# https://wiki.dendron.so/notes/F9LWJEjscrGkxnYi2JNby/#vaultselectionmodeoncreate
vaultSelectionModeOnCreate: alwaysPrompt
# Ensures that a backlink is left in place whenever `Dendron: Move...`
# commands are used to move content into a different note
# https://wiki.dendron.so/notes/F9LWJEjscrGkxnYi2JNby/#leavetrace
leaveTrace: true
...
...
# This ensures you are using cross vault link syntax (dendron://vault-name/my.note)
# whenever able. This is helpful in avoiding note name clashing, and is clear on
# what vault the note exists in without making a best guess
# https://wiki.dendron.so/notes/3i4ABJutl7NGeXRHTnUEC/#enablexvaultwikilink
# https://wiki.dendron.so/notes/3472226a-ff3c-432d-bf5d-10926f39f6c2/#cross-vault-links
enableXVaultWikiLink: true
...
...

Personal Home Vault (multi-vault)

Structure when running tree -d on my personal, at-home vault:

my-personal-home-vault
├── dependencies
│   ├── my-keybase-vault (keybase encrypts git repos)
│   │   ├── notes
│   │   │   └── assets
│   │   └── tools
│   ├── github.com
│   │   └── ScriptAutomate
│   │       ├── my-published-vault (content sharing to world)
│   │       │   ├── notes
│   │       │   │   └── assets
│   │       │   │       └── images
│   │       │   └── tools
│   │       └── my-mobile-vault (limited content for my phone access)
│   │           └── notes
│   └── gitlab.com
│       └── ScriptAutomate
│           └── another-vault-but-gitlab (docsgarden vault from gitlab)
│               └── notes
│                   └── assets
├── exports
├── notes
│   └── assets
│       └── images
├── pods
└── tools

my-personal-home-vault has the following dependencies:

  • my-keybase-vault
  • my-published-vault
  • my-mobile-vault
  • another-vault-but-gitlab

Work Vault (multi-vault)

Looks something like this:

my-personal-work-vault
├── dependencies
│   ├── github.com
│   │   └── ScriptAutomate
│   │       └── my-personal-home-vault (private, personal)
│   │           ├── notes
│   │           │   └── assets
│   │           │       └── images
│   │           └── tools
│   └── gitlab.com
│       └── TeamOrg
│           └── my-team-vault (private, content sharing with team)
│               └── notes
│                   └── assets
├── exports
├── notes
│   └── assets
│       └── images
├── pods
└── tools

NOTE: It should actually be pulling all the vaults into my work vault but Dendron self contained vaults don't currently look like they handle transitive dependencies. I've opened a ticket:

  • dendronhq/dendron#3792
  • This means I'd need to manually run the command to Add Vault for each vault in the dependency tree on my personal work vault if I also want everything there, too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment