by Rie Tamura
Send notes to an EmDash site as blog posts, with images, tags and categories.
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
statuscheckbox 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
- Sent as a draft; published right away only when the
- Converts headings, emphasis, links, nested lists, checkboxes, quotes, callouts, tables and code.
%%comments%%are not sent
Installation
From community plugins (recommended)
- In Obsidian, open Settings → Community plugins and turn off Restricted mode
- Select Browse, search for "Post To EmDash", then install and enable it
Manually
- Download
main.js,manifest.jsonandstyles.cssfrom Releases - Put them in your vault's
.obsidian/plugins/post-to-emdash/folder - Reload Obsidian and enable the plugin under Community plugins
Usage
- In the EmDash admin, create a token under "API Tokens" with the scopes
content:read,content:writeandmedia:write - In the plugin settings, enter the site URL and the token, then select "Check"
- Run "Create new EmDash post" to make a note and write your post (or add the fields below to any note)
- Run "Post this note to EmDash" (or use the ribbon button). The first send arrives as a draft
- Check it in the admin and publish it there, or check
statusand 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
| Setting | What it is |
|---|---|
| Site URL | The URL of your EmDash site |
| Access token | A token made under "API Tokens" in the EmDash admin (ec_pat_…) with the content:read, content:write and media:write scopes |
| Upload images | Whether to send the note's images to EmDash |
| Automatic thumbnail | Whether 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 |
| Timeout | How long to wait for the site (ms) |
| Folder for new posts | Where "Create new EmDash post" puts the note |
| Add field guide | Put a guide to the fields (%% … %%) in new posts |
| Image folder | Images offered by "Choose featured image". Empty means every image in the vault |
| Check connection | Try reading posts with the URL and token |
| Preview thumbnail | Show 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
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.