Integration Guide

Publish markdown from VS Code

Edit a markdown file, open the integrated terminal, run one command. The file you're editing is the file you're publishing. No extension required.

Setup in 4 steps

1. Install the MDtoLink CLI

Open any terminal and install the CLI globally:

npm install -g mdtolink

2. Open your markdown file in VS Code

Open any .md file. A project README, API docs, a blog draft, whatever you want to publish.

3. Open the integrated terminal

Press Ctrl+` on Linux/Windows or Cmd+` on macOS. The terminal opens in your project root.

4. Publish the file

Run the publish command with the filename:

mdtolink publish README.md

The CLI prints the URL. Copy it, share it, done.

Optional: keyboard shortcut

If you publish often, set up a VS Code task so you can publish the current file with a keybinding. Add this to your .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Publish to MDtoLink",
      "type": "shell",
      "command": "mdtolink publish ${file}",
      "presentation": {
        "reveal": "always",
        "panel": "shared"
      }
    }
  ]
}

Then bind it in keybindings.json:

{
  "key": "ctrl+shift+p",
  "command": "workbench.action.tasks.runTask",
  "args": "Publish to MDtoLink"
}

Pick whatever keybinding works for you. The task runs in the terminal panel and shows the published URL.

Why this workflow

VS Code's integrated terminal means you never leave the editor. The file you're looking at is the file you're publishing.

  • No copy-paste, no upload step. Edit, save, publish. The markdown file on disk is the source of truth.
  • No extension to install. MDtoLink is a CLI. It works in any terminal that has Node.js, including VS Code's.
  • Works with any project. Whether you're writing a README, API docs, or a blog post, the workflow is the same command.
  • Re-publish updates the same URL. Edit your file, run the command again. The URL stays stable, the content updates.

Frequently asked questions

Do I need a VS Code extension for MDtoLink?
No. MDtoLink is a CLI tool that works in any terminal, including VS Code's built-in terminal. There's no extension to install or configure.
Can I set up a keyboard shortcut to publish?
Yes. Create a task in your tasks.json that runs 'mdtolink publish ${file}', then bind it to a keyboard shortcut via keybindings.json. This gives you one-key publishing from any open markdown file.
Does MDtoLink work with VS Code Remote or SSH?
Yes. As long as the MDtoLink CLI is installed on the remote machine, you can publish from the integrated terminal in any Remote-SSH, WSL, or Dev Container session.
Can I preview the published page before sharing?
The CLI prints the URL after publishing. You can open it in your browser, or use VS Code's built-in Simple Browser (Command Palette > Simple Browser: Show) to preview without leaving the editor.

See more MDtoLink use cases for other workflows.

Publish markdown without leaving VS Code

Install the CLI, open the terminal, and run one command. Your markdown file gets a shareable URL instantly.

Free plan includes 5 documents. View pricing for higher limits.