Data Format for WriteFreely Import

To import posts into WriteFreely from an outside platform, it is ideal to get all articles into a JSON document that looks like the following, where each object in the array is a complete article:

[
  {
    "title": "Optional Post Title",
    "slug": "optional-post-title",
    "body": "Entire post content, in Markdown or HTML, including any images and #hashtags.\n\nNote: newlines should be preserved in this field, even when using HTML.",
    "font": "serif",
    "lang": "en",
    "rtl": false,
    "created": "2006-01-02T15:04:05Z"
  }
]

These field names map directly to the API — you can read details in the API documentation. Otherwise, a few notes:

In this format, we can trivially loop through the array of objects and POST each one directly to the WriteFreely API — creating either drafts or blog posts.

#WriteFreely #import #dataMigration


Get future updates via RSS and ActivityPub: @devlog@matt.writefreely.dev.