Export drafts again

This exact code was pull-requested and merged last week but has somehow been reverted in the meantime.

I have no idea why/how this has happened - maybe a bad merge, but this is mainly files that wouldn't have been touched so I really don't know what's gone on...