Autofill dates for old blog posts



I have a little bit of an usual question. A client is working on a project where he would like to create blog post entries going back many years for a fictional “retrospective” blog. I can see that it’s possible to backdate ghost blogs by toggling backward, but given the number of posts he would like to create, that will prove unwieldy.

Does anyone know if it would be possible to quickly create blank weekly blog posts going back to the 1970s? I am assuming that this would be possible with some kind of script, but I have no idea how to do it.

Thanks in advance for your help.



There are a couple of approaches you could use here:

  1. write a script to generate a bunch of content in a JSON file, and then import it into Ghost once you’re happy with it via the importer
  2. write a script to generate individual posts and send them to Ghost one-at-a-time using the Admin API.

Either work for what you want, it depends a little bit on the desired workflow. Either method allows for creating empty drafts and setting a custom published_at date in the past.

Our docs for both the Admin API and the importer (under migration) can all be found here:

1 Like


Fantastic Hannah, thank you so much! I’ll see if can make those work. I appreciate it.


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.