created here: https://caiorss.github.io/bookmarklet-maker/


bookmarklet



full code:
---------

var isoDate = (new Date()).toISOString();
var date = isoDate.split('T')[0];
var d = date.split('-');
var dataPermaLink = d.join('/');
var title= prompt("title", "").replaceAll(/([&$\+,:;'"=\?@#\s<>\[\]\{\}[\/]|\\\^%])+/g, '-');

var filename = date + "-" + title + '.md';

var html = [
'---',
'date: '+ isoDate,
'author: Stefan Hayden',
'layout: post',
'permalink: /blog/'+ dataPermaLink  +'/'+ title +'/',
'categories:',
'  - web',
'---',
].join('%0A');


window.location.href = "https://github.com/stefanhayden/stefanhayden.github.io/new/master/" + "?filename=_posts/" + filename + "&value=" + html;