yeet.md

by davidvkimball
5
4
3
2
1
Score: 51/100

Description

Publish current note to yeet.md.

Reviews

No reviews yet.

Stats

0
stars
104
downloads
0
forks
97
days
6
days
6
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
15
commits

Latest Version

7 days ago

Changelog

Declare the TypeScript lib the code actually uses; bump to 0.0.7

The tsconfig declared a lib that stops at ES2016, but the code calls newer built-ins such as Object.values, Object.entries and Array.flat. It only type checked because @types/node carries a reference to a newer lib as a side effect, so any type check without that injection treats those calls as any and reports the no-unsafe-* family on the community scorecard.

Declaring lib: ["DOM", "ES2020"] matches what was already in effect. This is a type-only change; esbuild sets its own target, so main.js is byte identical and the release stays reproducible.


Full Changelog: https://github.com/davidvkimball/obsidian-yeet/compare/0.0.6...0.0.7

README file from

Github

yeet.md for Obsidian

Publish the current note to yeet.md with one hotkey. Persists the per-snapshot delete token so you can unpublish later from inside Obsidian.

Install

Not yet in the community plugin directory. For now:

  1. Clone this repo into <vault>/.obsidian/plugins/yeet/.
  2. Run pnpm install && pnpm build inside that folder.
  3. Restart Obsidian. Enable yeet.md under Settings → Community plugins.

Commands

All four appear in the command palette and can be bound under Settings → Hotkeys:

  • yeet.md: Publish current note. Suggested hotkey: Ctrl/Cmd+Shift+Y.
  • yeet.md: Copy published link for current note
  • yeet.md: Unpublish latest snapshot of current note
  • yeet.md: Show all published snapshots from this vault

Publish flow

Hitting Publish on a note handles three cases automatically:

  • Fresh. Posts the note to yeet.md, copies the returned URL, stores the delete token.
  • Already published, unchanged. Just copies the existing URL. No new snapshot.
  • Already published, edited since. Prompts with three options:
    • Copy existing link (do nothing)
    • Publish as new snapshot (old one stays live at the old URL)
    • Replace (delete old snapshot, publish new one, reuse the record)

A status-bar indicator on desktop shows yeet.md ✓ when the active buffer matches an existing snapshot and yeet.md ↑ when the buffer has drifted from the latest snapshot. If a note has more than one snapshot, the count appears in parentheses.

Why "snapshots" and not "published notes"?

Each publish creates a new snapshot at a unique /s/<id> URL. The plugin publishes anonymously, and an anonymous snapshot can't be edited afterwards, so changing what is published means publishing a new snapshot. (Editing a snapshot in place is a yeet.md website feature, available to people signed in there with GitHub.) Editing the source note does not update prior snapshots, and unpublishing one does not unpublish the others. The plugin stores every snapshot the vault has ever produced so you can find, copy, or delete each of them individually.

Settings

  • API base URL. Defaults to https://yeet.md. Change it if you self-host.
  • Copy link after publish. Automatically copies the URL to clipboard.
  • Show toast on publish. Displays a notice with the URL.
  • Strip properties before publish. Comma-separated property names to remove from the copy sent to the server. Fields starting with _ are always stripped. Your note is not modified; only the HTTP payload.
  • Published snapshots. Browsable list at the bottom grouped by source note, with per-snapshot Open / Copy / Delete buttons.

Properties support

yeet.md renders Obsidian properties (YAML at the top of a note) as a clean metadata card above the note body. title, tags, aliases, dates, URLs, wikilinks, and arbitrary arrays all get sensible rendering. See the yeet.md about page for examples.

Use Strip properties in settings to hide private keys like _internal, cssclasses, plugin metadata, etc.

Security

Ownership of a published snapshot is established by a delete token issued by the server at publish time.

  • Tokens are stored in Obsidian's SecretStorage, backed by the OS keychain on desktop. They do NOT ride along with vault sync, so a leaked or shared vault cannot be used to unpublish your snapshots.
  • The snapshot record (id, URL, publish date, content hash, source path) still lives in data.json so the plugin knows the snapshot exists. The token is the only sensitive bit, and it's kept separately.
  • DELETE /api/delete/:id sends the token in Authorization: Bearer <token>. Server hashes and constant-time compares.
  • Sent over HTTPS only (plugin warns if you configure a non-HTTPS API base URL).
  • A per-vault random UUID is sent as X-Client-Id for server-side rate limiting. Not an auth credential.

Consequence of keychain storage: device-local unpublish. If you publish a note from your desktop, the delete token lives in your desktop keychain. If you later open the same vault on mobile, you'll see the snapshot in the "Published snapshots" list, but the Delete button will be disabled because the token isn't on the mobile device. To unpublish, go back to the device that published. This is the cost of not syncing tokens.

Upgrading from < v0.0.3: tokens are migrated automatically on first launch after the upgrade. Nothing to do on your end.

Development

pnpm install
pnpm dev      # rebuild on save
pnpm build    # production bundle
pnpm lint     # eslint + obsidianmd rules

Template: obsidian-sample-plugin-plus. See AGENTS.md and .agent/skills/ for the development skills system.

License

MIT © David V. Kimball