Teams

Summary

This goes over some best practices when using Dendron for teams.

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
    └── org-dev

Follow the instructions of converting a local vault to a remote vault if you wish to make each individual vault a GitHub repository

Vaults

main

  • org-private:
    • for company private notes
  • org-dev:
    • for developer related notes

optional

  • org-admin:
    • for sensitive data that you don't want to share with everyone in the company
  • org-public
    • for company material that you plan on publishing publically

Schemas

  • NOTE: you can get a copy of these schemas by adding this vault
  • company.yml
    • this reflects your company hierarchy
  • team.yml
    • this is used for your team
  • user.yml
    • this is used for users

Hiearchies

  • user.{username}.journal.{date}: use for daily updates from individual people
  • org.standup.{date}: use for standups
    • when the company grows, you can divide org into team specific standups (s/org/team.{teamName}/g)
  • meet.journal.{date}: use for notes on meetings

Example Workspace

.
├── .
├── dendron.code-workspace
├── dendron.yml
├── org-private/
│   ├── root.md
│   ├── acme.onboarding
│   ├── team.backend.onboarding
│   ├── team.backend.standup.2020.03.29
│   ├── ...
│   ├── user.alice.journal.2020.03.29
    └── user.bob.journal.2020.03.29

Helpful Commands

When you're working with multiple repositories, here are a few useful commands to use:

Vault Add (docs)

Adding vaults to your team's workspace is as easy as running this command and pointing to either a local or remote vault.

Move note (docs)

Move note will allow you to move notes quickly from one vault to another (potentially to make it public or provide more strict access control).

Refactor Hierarchy (dendron.ref.commands)

Use the refactor hierarchy command to bulk-move notes from one hierarchy/structure to another.

Workspace Sync

Synchronizes all notes across all vaults with git. Any changes you made will be pushed back to remote, and any changes in the remote will be pulled.

In more detail: Dendron will first commit all your changes, then pull changes from the remote, and finally push everything back to the remote. This workflow is good in most cases: private notes, internal shared vaults, or your personal writings. This workflow doesn't work as well in some cases however, so we offer per-vault configuration options which you can use to adjust how your notes are synchronized.

You can set these configuration options in your dendron.yml, either for each vault with the sync option, or for all workspace vaults with the workspaceVaultSync option. The configuration will look like this:

... rest of your dendron.yml
workspaceVaultSync: noPush
vaults:
    -
        fsPath: my-website
        sync: noCommit
        remote:
            type: git
            url: 'git@github.com:my-username/my-website.git'
    -
        fsPath: my-notes
        sync: sync
        type: git
            url: 'git@github.com:my-username/my-notes.git'

configuration options

sync

Dendron will try to synchronize everything: Dendron will first commit all your changes, then pull changes from the remote, and finally push everything back to the remote. This is the default for regular vaults.

noCommit

Pull and push updates if the workspace is clean, but don't commit. You manually commit your local changes, but automatically share them once you committed. This is good for vaults where you want to write a meaningful commit message and control what is being committed, for example a shared knowledge base or wiki. This is the default for Workspace Vaults.

noPush

Commit any changes and pull updates, but don't push. You can watch the repository and make local changes without sharing them back. This is good if you want to watch the updates in a vault and maybe even note your own thoughts in the vault without sharing them, for example an organization handbook that you don't want to edit yourself.

skip

Don't do any synchronization. This may be useful if you use some other tool to synchronize this vault.

Workspace Types

Dendron recognizes 2 types of workspaces, Code and Native. When you initialize your workspace with the Initialize Workspace command, you get a Code workspace. Code workspaces include a dendron.code-workspace file which sets up vaults and recommends installing some useful extensions. Code workspaces are great when you are setting up a knowledge base.

Native workspaces on the other hand don't have a dendron.code-workspace file. They are useful when you are writing notes or documentation, and you want to keep your notes as part of a project rather than a separate knowledge base.

See Native Workspace Setup to see how you can start using a native workspace!

Cookbook

Version control your workspace using Git

Inside your workspace, run the following

  1. Initialize a git repo
    git init
    git add .
    git commit -m "initial commit"
    
  2. Add a remote

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 a git 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 a git pull inside of it.


User Private Vaults

If you want to set it up so that each of your team members have private vaults in addition to the team vaults, have each of your team mebmers initialize a Dendron workspace locally. They can then add the team workspace as a remote workspace vault by entering the git endpoint where the workspace is located.


Children
  1. Quickstart

Backlinks