A Visual Studio Code extension for publishing posts to micro.blog (or any Micropub-enabled site) directly from your editor. All code (and most of this README) was created by Claude.ai. I'm just the idea guy.
- Node.js (v16 or higher)
- Visual Studio Code
- A micro.blog site or other Micropub-enabled website
{
"node-fetch": "^2.6.1"
}{
"@types/vscode": "^1.96.0",
"@types/node": "16.x",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"eslint": "^8.47.0",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"ts-loader": "^9.4.4",
"@vscode/test-electron": "^2.3.4",
"@types/node-fetch": "^2.6.1"
}- Download the latest
.vsixfile from the releases page - Open VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Install from VSIX" and select "Extensions: Install from VSIX"
- Navigate to and select the downloaded
.vsixfile
- Clone this repository
git clone https://github.com/yourusername/vscode-micropub
cd vscode-micropub- Install dependencies
npm install- Compile the extension
npm run compile- Package the extension
npm install -g @vscode/vsce
vsce package- Install the generated
.vsixfile in VS Code using the steps above
-
Get your Micropub token:
- Go to https://micro.blog/account/apps
- Generate a new app token
-
Configure the extension in VS Code:
- Open VS Code settings (Ctrl+,)
- Search for "micropub"
- Set your Micropub endpoint (for micro.blog, use
https://micro.blog/micropub) - Set your access token (include the word "Bearer" before your token)
- Create a new markdown file
- (Optional) Add front matter for title and tags:
---
title: My Post Title
tags: [tag1, tag2]
---- Write your post content
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Publish to Micro.blog" and select the command
- Your post will be published to your blog
---
title: Hello World
tags: [test, first-post]
---
This is my first post published directly from VS Code!