Drafts Actions for Markdown
Here are a couple of Drafts 5 script actions I’ve been working on recently. A while back I created an action to create Markdown links in the reference style. This allows you to use the syntax
[link text] in the body of the text, and then
: url at the bottom of the document. This is nice especially in long posts for keeping the body of the text uncluttered and readable.
The script automatically inserts the correct syntax both in the body and at the end, automatically incrementing the number each time you add a new link. If there is a URL in the clipboard, it will automatically use this.
What I’ve done more recently is to create a new, and similar, footnotes action. They are mutually compatible, so the incrementing of the reference number is shared. If there is text selected when the footnote action is run, it is moved into a footnote1. What you end up with is a mixed list of links and footnotes at the bottom of your document like this:
: https://wordpress.com : https://wordpress.com/pricing/ : https://jekyllrb.com : https://en.m.wikipedia.org/wiki/Ruby_(programming_language) : https://en.m.wikipedia.org/wiki/Markdown : https://en.m.wikipedia.org/wiki/HTML : https://en.m.wikipedia.org/wiki/Cascading_Style_Sheets : https://shopify.github.io/liquid/ : https://pages.github.com/ [^10]: If you’re a teacher, however, you can apply to get a full Developer or Team plan for free, which include unlimited private repositories and unlimited users. : https://help.github.com/articles/configuring-jekyll-plugins/ : https://github.com/barryclark/jekyll-now : http://www.barryclark.co : https://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/ : https://itunes.apple.com/gb/app/termius/id549039908?mt=8&uo=4&at=1001lsF2 : https://itunes.apple.com/gb/app/screens/id655890150?mt=8&uo=4&at=1001lsF2 [^17]: Please don’t read my early commit history! [^18]: The one time when you wish a laptop didn’t have MagSafe. : https://itunes.apple.com/gb/app/xcode/id497799835?mt=12&uo=4&at=1001lsF2 : https://desktop.github.com
Drafts 5 also allows you to set custom keyboard shortcuts for actions, so I currently have ⌘K for inline link, ⌘⇧K for reference links, and ⌘⇧⌥K for footnotes. It makes writing in Markdown feel completely frictionless.
Like so ↩