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.

  1. Open dendron.yml from the root of your workspace
  2. Ensure enableExportPodV2: true is present:
    dev:
        enableExportPodV2: true
    
  3. 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:

  1. Run the Dendron: Export Pod V2 command
  2. Select New Export
  3. Select MarkdownExportV2
  4. Select Note (Exports the currently opened note)
  5. Select clipboard (Puts the contents of the export into your clipboard)
  6. Select Add note title from FM as h1 header (Add note title from the frontmatter at the start of your exported note)
  7. Select Yes (to persist the configuration, in order to run the export in the future)
  8. 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.

  1. Create a note titled hello using Dendron: Note Lookup. Add the following text:
    Greetings world!
    
  2. Create another note titled garden and add the following text.
    Welcome to my digital garden.
    
  3. Run > Copy Note Ref inside of the garden note. Then switch back to hello and paste the reference in a newline under Greetings world!. You should end up with the following text
    Greetings world!
    ![[garden]]
    

Run the export command

  1. While inside the hello note, run the Dendron: Export Pod V2 command

  2. Select markdown.note.clipboard

  3. You will be asked about an export scope. Select Note

  4. 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.

  1. Run the Dendron: Configure Export Pod V2 command
  2. Select markdown.note.clipboard
  3. Uncomment exportScope by removing the # symbol in front of it
    # exportScope: Note
    

Your configuration should look like the following:

# 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

  1. Switch back to hello note
  2. Run the Dendron: Export Pod V2 command
  3. 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:

  1. Run the Dendron: Export Pod V2 command
  2. Select markdown.note.clipboard

We can improve this process by creating Keybindings for your export pod.

  1. Run Open Keyboard Shortcuts (JSON)
  2. 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.

  1. Open up the hello note
  2. 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