date: 2018-07-22 title: Filename from metadata for Save as Header publish: true

I filed this as an issue. It’s a big ask but i have hope because the maintainer has been exceedingly responsive.

A common format to add metadata to markdown files is simply:

key: value

Regular content starts after a space.

(Jekyll uses a variation with opening and closing --- lines, but if save as heading just looked for key value pairs before a space, it wouldn’t need any special casing to handle the Jekyll format.)

My dream would be to be able to set save-as-heading’s “Filename type” to “Metadata” and then have a “Filename template” textfield in which i could enter the metadata to use for the filename, for example %date%-%title% and if i had a new Atom tab with content like this:

title: This would be wonderful
date: 2018-07-22
publish: true

This is a new file, i'm about to save it with `ctrl+shift+H`.

I would get a file named 2018-07-22-this-would-be-wonderful.md

How’s that sound?

Update:

He did it, he’s awesome. Use key in metadata and just use whatever arbitrary keys you define (key: value) as the tokens in the title. So in my case:

%date%-%title%

I also replace all of these with a dash (-) though i’d prefer some be replaced with nothing:

'"()!@#$%^&*/=?[]{}|<>.,;