projects / blog_formatter.md public repo

blog_formatter

electron

JavaScript
owner demonerdpity
language JavaScript
topics 01
reader / README.md markdown render

Blog Formatter

Electron desktop tool for converting Obsidian notes into blog-ready Markdown.

What it focuses on

  • Works with the current vault at C:\Users\admin\work\clioc
  • Writes blog output to C:\Users\admin\work\blog
  • Handles notes without # H1
  • Resolves Obsidian image embeds like ![[image.png]] and ![[image.png|300]]
  • Treats drag-in as "import to workbench", not as moving the source note out of the vault

Title strategy

The converter derives title in this order:

  1. frontmatter.title
  2. First # H1 in the note body
  3. File name if it looks meaningful
  4. First visible ## or deeper heading
  5. First visible content line

Image strategy

For local image references, the tool checks:

  1. Absolute path
  2. Path relative to the note
  3. The Obsidian attachment folder path, such as ./assets
  4. Vault-root-relative path
  5. Whole-vault basename search

Resolved images are copied into:

<blogRepoRoot>/public/images/<safeTitle>/

Scripts

npm install
npm run dev
npm run test
npm run build