Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VS Code Micropub Publisher

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.

Prerequisites

  • Node.js (v16 or higher)
  • Visual Studio Code
  • A micro.blog site or other Micropub-enabled website

Dependencies

Main Dependencies

{
    "node-fetch": "^2.6.1"
}

Development Dependencies

{
    "@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"
}

Installation

From VSIX file

  1. Download the latest .vsix file from the releases page
  2. Open VS Code
  3. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  4. Type "Install from VSIX" and select "Extensions: Install from VSIX"
  5. Navigate to and select the downloaded .vsix file

Building from source

  1. Clone this repository
git clone https://github.com/yourusername/vscode-micropub
cd vscode-micropub
  1. Install dependencies
npm install
  1. Compile the extension
npm run compile
  1. Package the extension
npm install -g @vscode/vsce
vsce package
  1. Install the generated .vsix file in VS Code using the steps above

Configuration

  1. Get your Micropub token:

  2. 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)

Usage

  1. Create a new markdown file
  2. (Optional) Add front matter for title and tags:
---
title: My Post Title
tags: [tag1, tag2]
---
  1. Write your post content
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  3. Type "Publish to Micro.blog" and select the command
  4. Your post will be published to your blog

Example Post

---
title: Hello World
tags: [test, first-post]
---
This is my first post published directly from VS Code!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages