Cookbook
Basics
Launch the command palette
This lets you execute commands inside VS Code
- Linux:
Ctrl+Shift+P
- macOS:
Cmd+Shift+P
- Windows:
Ctrl+Shift+P
Manual Install
To manually install a custom version of Dendron, first obtain the Dendron vsix file (most likely, Kevin will send you a dropbox link π ). Afterwards, you can install it by the extended options in the extensions pane.
Checking Logs
You can diagnose most problems by checking the logs. You can view the logs using the Open Logs Command
Server Logs
Dendron has two sets of logs - client and server. The client logs you can access using the Open Logs Command
. You can access the server logs by following the tutorial here.
Logs from previous session
Dendron has logs for the current session and the previous session.
You can get logs of the previous session by following instructions here
Mobile Support
A comparison of mobile apps for Markdown can be found on the Dendron blog: Best Mobile Note-Taking Apps for Markdown. For a more in-depth comparison of text editors focusing on iOS devices, also take a look at this iOS Text Editor roundup by Brett Terpstra.
Dendron does not have a dedicated mobile client at this time. There are numerous mobile Markdown editors that can be used to view and edit Dendron notes. Some popular options are listed below, based on feedback in the Dendron community:
- GitJournal
- iA Writer
- Obsidian
- Notebooks App (iOS, MacOS, and PC)
- Epsilon Notes (Android only)
- Neutrinote (Android only)
- Noteless (Android only). This just received experimental Dendron support so worth trying out.
- Markor (Android only)
- Scarlet Notes (Android only)
- Working Copy (iOS only)
- Editorial (iOS only)
- Taio (iOS only)
- Textastic (iOS only)
Most mobile apps do not have git support. Here are some third-party guides that have been written up to assist:
- If you are on iOS, you can follow the instructions here to sync your git backed Dendron with any note taking tool on iOS.
- If you are on Android, you can read this writeup by a user on having Git Sync on Android devices. MGit is also recommended for Android users when it comes to syncing your git backed Dendron with any note taking tool on Android.
If using GitHub with SSH keys or access tokens, here is an alternative: SSH keys that have project/repo-limited permissions as Deploy Keys on GitHub (with Allow write access
enabled). This prevents users from setting up SSH keys with user-wide permissions across GitHub, making it more secure and limited.
Vaults
Adding a Remote Vault to your Dendron Workspace
If you haven't already done so, install Dendron and initialize a workspace by following the instructions here.
Use the Add existing Vault command via the command palette, select remote vault, and paste the git url of the vault that you like to add
Converting a local vault to a remote vault
- If your vault is committed along with your workspace, use
git rm --cached
to remove it from the workspace repo and usegit init
to initialize your vault as a standalone repo - Navigate to the root of your vault and initialize a git repository
cd {vaultName} git init git add . git commit -m "initial commit" git add origin {your origin} git push -u origin HEAD
- Run Configure (yaml) and add the git remote urls to the repo. the entries should look like what you see below
vaults:
- fsPath: dendron
remote:
type: git
url: "git@github.com:dendronhq/dendron.git"
When someone pulls down a workspace with a dendron.yml
that contains a remote vault, Dendron will automatically initialize the vault at the given fsPath
. If the vault is a Vaults, Dendron will pull down the workspace to {workspaceName}/fsPath
.
If you put a vault in a git repository with a remote without using the Vault Convert command, then it will be missing the correct configuration. Dendron can fix the configuration for you with the fix remote vaults doctor action.
Create note in a specific vault
There are multiple ways to create a note in a specific vault
- open a note that is already in the vault (all vaults have a
root
note by default so thats a quick way to select a particular vault) - use the vaultSelectionMode modifier on lookup to select a new vault on creation
Renaming a Vault
We currently haven't implemented a command to do but you can use the current manual steps to implement.
- Update the name property in
dendron.yml
- Update the name property on the corresponding workspace folders
- Replace any cross Vault Links with the name of the new workspace
- ctrl search
dendron://{vaultName}
and replace it with the new vaultName
- Run
> Reload Window
when these steps are completed
Private Vaults
You can create private vaults that won't be published or initialized when others clone the workspace. To do this, run Add Existing Vault and add your private vault as a local vault. After it's been added, run Configure (yaml) and set the visibility of the vault to "private" in dendron.yml
.
vaults:
- fsPath: vault
visibility: private
Publishing
How do I exclude certain vaults from being published?
Transferring
Export your notes as a PDF
Our current guidance is to use pandoc to export your notes. Pandoc supports a wide variety of export formats including pdf, doc, and HTML.
Workspace
Access Dendron Workspace from multiple windows
There are usually two scenarios:
- you want two windows of different workspaces
- you want two windows of the same workspace
- for 1, create a new window and initialize a new workspace in some directory that is different from your first workspace
- for 2, you have a few options
- a. initialize a new workspace in a different directory. open the settings using
> Open User Workspace settings (JSON)
. change the folder to the path of your vault in the initial workspace. run> Reload Window
for the changes to take affect - b. use a different version of VS Code to open the same workspace (eg. VS Code Insiders, VSCodium, VS Code regular). you need to do this because VS Code will re-use the same window when opening the same workspace
- a. initialize a new workspace in a different directory. open the settings using
Add Dendron to application launchers on Linux desktops
Linux desktop systems often include application launchers where you can see the applications installed on your computer and launch them. You can add an entry for Dendron to the application launcher by creating a file at ~/.local/share/applications/dendron.desktop
, then pasting the following contents into it.
[Desktop Entry]
Comment=A personal knowledge management tool that grows as you do.
Exec=code --no-sandbox --new-window ~/Dendron/dendron.code-workspace
Name=Dendron
Type=Application
StartupWMClass=code
Keywords=dendron;notes;pkm;
Categories=Utility;TextEditor;
Make sure the path to the Dendron workspace matches your setup. Then, run update-desktop-database ~/.local/share/applications/
in a terminal or restart your system. You should now see Dendron in the launcher under the Utilities section, or if you search for Dendron in your launcher. Launching Dendron from here will launch VS Code with your Dendron workspace open.
Change the sorting order in the Outline Panel
Click the three little dots next to outline to change the sorting order. You can sort by Name (alphabetical) or Position (linear order)
Drag and Drop files into Dendron
To drag files into Dendron, open the workspace pane on the side to drag and drop. We currently recommend you only do this for non-Markdown files that you want to link to inside your vaults.
Find Installed Extensions
- Navigate to the extensions pane
- Search for
@installed
Use Dendron with a current folder
- start by initializing a workspace
Initialize Workspace
- shortcuts: none
Create a new workspace
- by default, Dendron uses a
vaults
folder underneath your workspace to store you vaults. Update your settings and changevault
to the path of your current notes (alternatively, you can also copy your current notes intovault
)
"folders": [
{
"path": "vault"
},
...
],
- Run
> Dendron: Reload Index
for Dendron to pick up changes
Using Multiple Workspaces
The easiest current way to do this is to have multiple instances of VS Code open and toggle between the two. If you are very adventurous, you might even have multiple versions of VS Code for different contexts.
We are working on being able to run Dendron without the need for a workspace. You can track the progress of this on this issue
Updating a workspace
Other
Syncing Dendron between devices
Using git and GitHub
One of our users published a great guide on this here
Use Dendron on a separate instance of VS Code
You can use Dendron on a separate instance of VS Code by launching it with the command line flags --user-data-dir
and --extensions-dir
:
code --user-data-dir=/path/to/code-dendron --extensions-dir=/path/to/code-dendron-ext
Star/Favorite/Pin Notes
Dendron doesn't currently provide native support for this. You can download the Bookmarks extension to achieve the functionality in the interim.
Analyze notes using Elasticsearch
- WARNING: this is advanced material
With Dendron, you can export your notes using the JSON Export Pod and then use that data to analyze your notes using Elasticsearch.
This video walkthrough walks you through that process.
You can download the repo used in this walkthrough from GitHub
Pre-requisites:
- download and run Elasticsearch
Steps:
- Export your data using the JSON Export Pod
- Create an index in Elasticsearch (we're using version 7.9)
PUT notes
{
"mappings": {
"properties": {
"created": {
"type": "date",
"format": "epoch_millis"
}
}
}
}
- Pipe exported JSON into the newly created index.
cat /path/to/exported/notes.json | jq -c '.[] | {"index": {"_index": "notes", "notes", "_id": .id}}, .' | curl -H'Content-Type: application/json' -XPOST localhost:9200/_bulk --data-binary @-
- Profit!
Some potential use cases you can do using Elasticsearch and Dendron:
- filter your notes by any logical combination of custom attributes
- make a heatmap of notes created by date
- get a full list of tags used across your vault and on a per hierarchy basis
- anything else you can thin of :)
Some useful additional links:
Convert timestamps in the frontmatter
Currently, Dendron notes show timestamps in epoch time which is not the most parsable for humans. You can use the timestamp converter extension order to see a human representation of said timestamp.
Use Dendron with Anki
WebClipper
You can use the markdownload-markdown-web extension to clip content as Markdown from Chrome.
Regex
To get familiar with regex syntax, try regexr is a great place to experiment with different queries.
Automatically Convert Casing on a Note
You can use the string converter extension to change [[normal note with spaces]]
to [[normal-note-with-spaces]]
as well as a series of other text transformations.
Displaying Dendron tree in its own side bar icon
You can drag the Dendron tree view, or any other view, to the side bar, it will get its own container.
Backlinks