MDtoLink for VS Code
Publish markdown files to shareable URLs with one command. Works in VS Code and Cursor.
Features
- Publish any markdown file to a shareable URL
- Update previously published documents with one command
- Unpublish documents when you no longer need them
- Copy URL of published documents to clipboard
- List all your published documents
- Status bar shows publish state of the active file
- Sidebar TreeView lists all published documents in the workspace
- Keyboard shortcut:
Cmd+Shift+M (Mac) / Ctrl+Shift+M (Win/Linux)
Setup
- Install the extension from the VS Code Marketplace or Open VSX
- Get an API key from app.mdtolink.com/dashboard/account
- Run
MDtoLink: Set API Key from the Command Palette (Cmd+Shift+P)
- Open a markdown file and press
Cmd+Shift+M to publish
Commands
| Command |
Description |
MDtoLink: Publish to MDtoLink |
Publish or update the current markdown file |
MDtoLink: Unpublish from MDtoLink |
Remove a published document |
MDtoLink: Copy MDtoLink URL |
Copy the published URL to clipboard |
MDtoLink: List Published Documents |
Browse all your published documents |
MDtoLink: Set API Key |
Configure your API key |
MDtoLink: Refresh Published Documents |
Refresh the sidebar document list |
Settings
| Setting |
Default |
Description |
mdtolink.serverUrl |
https://api.mdtolink.com |
API server URL |
mdtolink.defaultPublic |
true |
Whether new documents are public by default |
How It Works
- Published document IDs are tracked in
.vscode/mdtolink.json (relative file paths mapped to document metadata)
- Re-publishing a file updates the existing document instead of creating a new one
- Your API key is stored securely in the OS keychain via VS Code's SecretStorage API
- Free plan: 5 documents with auto-generated URLs. Pro plan: unlimited documents with custom slugs
Publishing the Extension
Prerequisites
VS Code Marketplace: Create a publisher at marketplace.visualstudio.com/manage. Generate a Personal Access Token (PAT) from dev.azure.com with the Marketplace (Manage) scope.
Open VSX (for Cursor): Create an account at open-vsx.org and generate an access token from your settings page.
Manual Publishing
# From the monorepo root
pnpm install
pnpm build:vscode
# Package the extension
cd apps/vscode
npx @vscode/vsce package --no-dependencies
# Publish to VS Code Marketplace
npx @vscode/vsce publish --no-dependencies
# You'll be prompted for your PAT, or set VSCE_PAT env var
# Publish to Open VSX (Cursor)
npx ovsx publish *.vsix
# Set OVSX_PAT env var or pass --pat <token>
Automated Publishing (CI/CD)
A GitHub Actions workflow at .github/workflows/publish-vscode-extension.yml automatically publishes when changes to apps/vscode/ are pushed to main and the version in package.json has been bumped. Same pattern as the Obsidian plugin workflow.
Setup
Add these secrets to your GitHub repository settings:
VSCE_PAT — Azure DevOps Personal Access Token with Marketplace scope
OVSX_PAT — Open VSX access token
To release a new version, just bump the version and push:
cd apps/vscode
npm version patch # or minor, or major
cd ../..
git add apps/vscode/package.json
git commit -m "chore(vscode): bump version"
git push origin main
The workflow will automatically:
- Detect the new version (compares
package.json version against existing git tags)
- Build and package the extension as a
.vsix
- Publish to the VS Code Marketplace
- Publish to Open VSX (for Cursor)
- Create the
vscode-v{version} git tag
- Upload the
.vsix as a GitHub Actions artifact
If you push changes to apps/vscode/ without bumping the version, the workflow runs but skips publishing (the tag already exists).
Development
# From the monorepo root
pnpm install
# Watch mode (rebuilds on changes)
pnpm dev:vscode
# One-time build
pnpm build:vscode
# Test in VS Code
# Open apps/vscode/ in VS Code, press F5 to launch Extension Development Host
License
MIT