Post To EmDash

approvedunreviewed

by Rie Tamura

Send notes to an EmDash site as blog posts, with images, tags and categories.

★ 2 stars↓ 74 downloadsUpdated 20d ago0BSD

Post To EmDash - Obsidian plugin

Language: English | 日本語

Post a note written in Obsidian to an EmDash site as a blog post.

Features

  • Create new EmDash post: asks for a title and creates a note with the fields ready to fill in
  • Choose featured image: pick an image from your image folder, shown with thumbnails, and put it in cover
  • Preview thumbnail: draws a sample with the design saved on the site and shows it, without posting or uploading anything (command or a button in the settings)
  • Post this note to EmDash: sends the open note (command or ribbon button)
    • Sent as a draft; published right away only when the status checkbox is checked
    • Images are uploaded and placed in the post. The featured image is cover, or the first image in the body
    • With neither, an automatic thumbnail is made: the post's title and date on a design set on the site (the site needs the Auto Thumbnail Design plugin)
    • Category, tags and excerpt are sent too. Tags the site lacks are created
    • Sending the same note again updates the same post. If it was edited in the admin, you are asked before overwriting
  • Converts headings, emphasis, links, nested lists, checkboxes, quotes, callouts, tables and code. %%comments%% are not sent

Installation

From community plugins (recommended)

  1. In Obsidian, open Settings → Community plugins and turn off Restricted mode
  2. Select Browse, search for "Post To EmDash", then install and enable it

Manually

  1. Download main.js, manifest.json and styles.css from Releases
  2. Put them in your vault's .obsidian/plugins/post-to-emdash/ folder
  3. Reload Obsidian and enable the plugin under Community plugins

Usage

  1. In the EmDash admin, create a token under "API Tokens" with the scopes content:read, content:write and media:write
  2. In the plugin settings, enter the site URL and the token, then select "Check"
  3. Run "Create new EmDash post" to make a note and write your post (or add the fields below to any note)
  4. Run "Post this note to EmDash" (or use the ribbon button). The first send arrives as a draft
  5. Check it in the admin and publish it there, or check status and send again

Writing a note

---
title: Post title             # defaults to the note name
slug: my-first-post           # last part of the URL; made from the title if empty
excerpt: A short summary
category: Development         # the name of a category on the site
tags: [webdev, tools]         # leave out to keep the site's tags
cover: "[[cover.png]]"        # featured image
status: false                 # checkbox: unchecked = draft, checked = publish
---

status: publish and status: draft from older notes still work.

If Obsidian shows status as text, click the icon beside the property and choose Property type → Checkbox. This applies to every note in the vault.

Sending adds emdash_id, emdash_url and emdash_rev. Remove them and the next send makes a new post.

Settings

SettingWhat it is
Site URLThe URL of your EmDash site
Access tokenA token made under "API Tokens" in the EmDash admin (ec_pat_…) with the content:read, content:write and media:write scopes
Upload imagesWhether to send the note's images to EmDash
Automatic thumbnailWhether to give a post with no cover and no image in the body an automatic thumbnail. Does nothing if the site lacks the Auto Thumbnail Design plugin. A featured image chosen in the admin is never replaced
TimeoutHow long to wait for the site (ms)
Folder for new postsWhere "Create new EmDash post" puts the note
Add field guidePut a guide to the fields (%% … %%) in new posts
Image folderImages offered by "Choose featured image". Empty means every image in the vault
Check connectionTry reading posts with the URL and token
Preview thumbnailShow a sample of the automatic thumbnail in the design saved on the site

The token is kept in the Obsidian keychain, not in the plugin's data.json, so syncing your vault does not spread it. The keychain is per device, so enter it on each computer and phone.

Development

npm install
npm run dev     # watch and build
npm run build   # production build (main.js)
npm run lint
npm test        # converter tests

Put main.js, manifest.json and styles.css in your vault's .obsidian/plugins/post-to-emdash/ to load it.

License

0BSD

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.