PodV2 Quickstart
Summary
The goal of this quickstart is to get you familiar with Pod V2.
In this quickstart, we will be using the Markdown Export Pod to export a note from Dendron Markdown to regular Markdown.
Concepts
The following are concepts we will be referring to in this quickstart
Pods
A pod is a Dendron plugin that can transfer information between Dendron to and from any other tool or destination.
Pod Connection
A pod connection is the set of configuration you will need to connect to a pod destination. Usually this is API credentials and identifiers of the target account
Pod Configuration
A pod configuration is the set of configuration that describes how notes will be transferred and where they will go.
Pod Target
The tool or destination that Dendron is transferring information between.
Enable PodV2
In order to make use of PodV2, due to it being in Preview, we need to explicitly enable it.
- Open
dendron.yml
from the root of your workspace - Ensure
enableExportPodV2: true
is present:dev: enableExportPodV2: true
- Run
Dendron: Reload Window
Export your note
Create your first pod configuration
To run a pod, you must first create a Pod Configuration. This tells Dendron what and how to export.
Let's use the Markdown Export Pod.
To create a pod configuration:
- Run the
Dendron: Export Pod V2
command - Select
New Export
- Select
MarkdownExportV2
- Select
Note
(Exports the currently opened note) - Select
clipboard
(Puts the contents of the export into your clipboard) - Select
Add note title from FM as h1 header
(Add note title from the frontmatter at the start of your exported note) - Select
Yes
(to persist the configuration, in order to run the export in the future) - Enter
markdown.note.clipboard
New pod configurations are saved in pods/custom/
at the root of your workspace. This should create pods/custom/config.markdown.note.clipboard.yml
.
- TIP: if you want to edit your pod configuration, you can run
Dendron: Configure Export Pod V2
to open up the corresponding configuration
Create some notes
Lets create some notes for exporting.
- Create a note titled
hello
usingDendron: Note Lookup
. Add the following text:Greetings world!
- Create another note titled
garden
and add the following text.Welcome to my digital garden.
- Run
> Copy Note Ref
inside of the garden note. Then switch back tohello
and paste the reference in a newline underGreetings world!
. You should end up with the following textGreetings world! ![[garden]]
Run the export command
-
While inside the
hello
note, run theDendron: Export Pod V2
command -
Select
markdown.note.clipboard
-
You will be asked about an export scope. Select
Note
-
Create a new note, called
pod-test
and paste the contents. It should look like the following# Hello Greetings world! Welcome to my digital garden.
Some things to note:
- the frontmatter title has been converted to an
h1
title - the Note Reference has been converted into inline markdown
Updating your pod export scope
Update your pod config
To tweak the export process, you can edit a saved pod configuration.
- Run the
Dendron: Configure Export Pod V2
command - Select
markdown.note.clipboard
- Uncomment
exportScope
by removing the#
symbol in front of it# exportScope: Note
Your configuration should look like the following:
- NOTE: to get more details about what each config key controls, see Common Pod Properties
# description: configuration ID
# type: string
# required: true
podId: markdown.note.clipboard
# description: optional description for the pod
# type: string
# description: TODO
# description: export scope of the pod.
# type: string
# NOTE: When a setting is missing from this config, you will get a UI prompt to select a value for that setting while running the export pod. For this particular exportScope setting, if you would rather not be prompted and always have the same exportScope, simply uncomment the line below.
exportScope: Note
# description: type of pod
# type: string
# required: true
podType: MarkdownExportV2
# description: How to convert the wikilinks
# type: boolean
wikiLinkToURL: false
# description: export destination. Specify either a file path or 'clipboard' to export to your clipboard
# type: string
# required: true
destination: clipboard
# description: undefined
# type: boolean
convertTagNotesToLinks: false
# description: undefined
# type: boolean
convertUserNotesToLinks: false
# description: undefined
# type: boolean
addFrontmatterTitle: true
Export your note again
- Switch back to
hello
note - Run the
Dendron: Export Pod V2
command - Select
markdown.note.clipboard
Note that you were not prompted for a scope since you've already specified that in your config.
Add a keyboard shortcut
Currently, exporting your notes is a two step process that consists of:
- Run the
Dendron: Export Pod V2
command - Select
markdown.note.clipboard
We can improve this process by creating Keybindings for your export pod.
- Run
Open Keyboard Shortcuts (JSON)
- Add the following keybinding
{ "key": "ctrl+k m", "command": "dendron.exportPodv2", "args": {"podId": "markdown.note.clipboard"} },
Now you can run export using the keybinding instead.
- Open up the
hello
note - Type
ctrl+k m
Congratulations!
You've setup your first pod configuration and exported it to your clipboard!
Takeaways
- you can create new pod configurations using
Dendron: Export PodV2
- you can configure a pod configuration using
Dendron: Configure Export Pod V2
- by default, when creating a pod configuration, dendron will prompt you for a scope - you can explicitly set a scope in the pod config to remove the prompt
- you can create a keybinding to trigger your pod configuration
Backlinks