Create a new blog post.
Args:
post_data: Dictionary containing post data with required fields:
- title: The title of the post
- lexical: The lexical content as a JSON string
Additional optional fields:
- status: Post status ('draft' or 'published', defaults to 'draft')
- tags: List of tags
- authors: List of authors
- feature_image: URL of featured image
Example:
{
"title": "My test post",
"lexical": "{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Hello World","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}"
"status": "draft",
}
ctx: Optional context for logging
Returns:
Formatted string containing the created post details
Raises:
GhostError: If there is an error accessing the Ghost API or invalid post data