-
rewrite from scratch with the plugin template obsid provides.
-
all it has to do is:
- Confirm YAML opener and closer exist with
title: """inside (but title should be replaceable in plugin settings) should be more flexible and not as strict
- Confirm YAML opener and closer exist with
-
should be configurable so assign ANY element in the doc to filename automatically (why not? It'll get me comfy w obsidian API. maybe I should wait until they finalize the API more?)
-
if you try to name a file "foo" but "foo" already exists, the obsidian dev console will say "Error: Dest file already exists!" but nothing will happen visibly without the dev console open. Maybe I should make a popup, like "that filename already exists in this directory, pick something else" etc
---
title: "sampleTitle"
But I built it to work with the following:
---
layout: note
title: "sampleTitle"
date: 2022-03-13 19:10:06
---
It only acts on save, not on fileopen to avoid interference with other plugins; must edit the file to trigger it.
This code is a fugly hack of dvcrn's repo; exact same behavior but for the first heading in the file instead of the YAML title. They deserve all credit.
MIT licensing.