Skip to content

feat: Add Ghost CMS integration with native scheduling support#1330

Closed
siva-sub wants to merge 8 commits into
gitroomhq:mainfrom
siva-sub:feat/ghost-provider
Closed

feat: Add Ghost CMS integration with native scheduling support#1330
siva-sub wants to merge 8 commits into
gitroomhq:mainfrom
siva-sub:feat/ghost-provider

Conversation

@siva-sub
Copy link
Copy Markdown

Summary

This PR adds complete Ghost CMS integration to Postiz, enabling users to publish and manage content on their Ghost blogs directly from the Postiz platform.

Key Features

  • Native Scheduling Support: Ghost posts scheduled in Postiz now appear immediately in Ghost CMS with scheduled status, instead of waiting for Temporal to publish at the scheduled time. This provides better visibility and management in Ghost.

  • Full CRUD Operations: Create, read, update, and delete Ghost posts through Postiz API.

  • Ghost Tools: Comprehensive set of tools for Ghost management via the integration-trigger endpoint:

    • tags - List all tags
    • authors - List all authors
    • tiers - List membership tiers
    • newsletters - List newsletters
    • posts / listPosts - List posts
    • getPost / getPostBySlug - Get specific posts
    • createPost / updatePost / deletePost - Post management
    • changeStatus - Change post status (draft/published/scheduled)
    • preview - Create preview drafts
    • Theme settings and more

Technical Changes

  1. SocialAbstract: Added supportsNativeScheduling = false property
  2. SocialProvider Interface: Added supportsNativeScheduling?: boolean
  3. GhostProvider: Set supportsNativeScheduling = true
  4. Post Activity: Added supportsNativeScheduling(integration) activity
  5. Post Workflow: Check native scheduling before sleep; skip for providers like Ghost

How Native Scheduling Works

Before (Temporal Wait):

  1. User schedules post for tomorrow
  2. Temporal workflow waits until tomorrow
  3. Ghost provider is called
  4. Post appears in Ghost CMS

After (Native Scheduling):

  1. User schedules post for tomorrow
  2. Temporal workflow checks supportsNativeScheduling for Ghost → true
  3. Workflow calls Ghost provider immediately
  4. Ghost creates post with status: 'scheduled' and published_at
  5. Post appears in Ghost CMS immediately as "scheduled"
  6. Ghost handles actual publishing at scheduled time

Apology

I apologize for the previous PR (#1324) being closed as spam. This was unintentional and I appreciate the maintainers' patience. This is a legitimate feature contribution.

Test Plan

  • Create scheduled Ghost post - appears in Ghost CMS as 'scheduled'
  • Create published Ghost post - appears immediately as 'published'
  • Create draft Ghost post - appears as 'draft'
  • Verify native scheduling flag works for Ghost (true) and other providers (false)

🤖 Generated with Claude Code

siva-sub and others added 8 commits March 20, 2026 17:18
Ghost Admin API requires updated_at timestamp for post edits to prevent
UPDATE_COLLISION (409) errors. The fix fetches current post state before
editing to obtain the correct updated_at value.

- update() method: fetch current post, include updated_at in edit
- changeStatus() method: fetch current post, include updated_at in edit
- Add member_status parameter for preview (public/members/paid)
- Add include parameter for tags, authors, tiers in preview response
- Fetch and return theme CSS variables from custom_theme_settings API
- Add previewUrlWithParams for member status testing
- Implement three preview modes: static, live, member
- Add theme presets for Casper, Casper Dark, Edition, Liebling
- Add member upsell overlay simulation for member preview mode
- Fixed credentials=*** and authToken=*** corrupted patterns
- Fixed this.p...en) → this.parseCredentials(token)
- Fixed this.g...ey) → this.generateAuthToken(credentials.adminApiKey)
- Renamed uploadImage @tool method to uploadImageBase64 to avoid conflict with private uploadImage
- Fixed credentials.apiKey → credentials.adminApiKey property access
- Add temporal, temporal-postgresql, temporal-elasticsearch containers
- Fix dynamic config format for Temporal (use array with constraints)
- Connect postiz container to temporal-network for workflow communication
When a provider supports native scheduling (like Ghost), the Temporal
workflow now posts immediately and lets the provider handle scheduling.
This allows scheduled posts to appear in Ghost CMS immediately with
'scheduled' status instead of waiting until the publish date.

Changes:
- Add supportsNativeScheduling property to SocialAbstract base class
- Add supportsNativeScheduling to SocialProvider interface
- Set supportsNativeScheduling=true in GhostProvider
- Add supportsNativeScheduling activity to check provider capability
- Update post workflow to skip sleep for native scheduling providers

For Ghost: scheduled posts now appear in the Ghost dashboard immediately
as 'scheduled' status, and Ghost handles the actual publishing at the
configured time.

fixes gitroomhq#1324

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 20, 2026

Someone is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 20, 2026

🚧 Skipped: PR exceeds review size limit.

Please split into smaller PRs and re-run.
Reference ID: 989448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant