This page was translated from the original by AI.
After the hard work in the previous two posts, we can now publish articles from the EmDash backend. However, since we migrated from Astro, there's some historical baggage—or rather, some things that aren't quite right—that we need to fix.
Double Publication Date

As you can see in the image, the Publication date at the bottom is the pubDate value from when we wrote static MDX blogs in Astro. But on the right, EmDash also has its own Publish date value—we only need to keep one of them. We'll keep EmDash's built-in one and remove the Publication date below.
The fix is simple: go to Content Types → Post, find publication date, and click delete.
Of course, I won't go into the code changes involved here. Claude Code can handle that easily.

Scheduled Publishing Didn't Work
There's still one issue: when I set a post to be published on a schedule, it doesn't actually go live at the specified time. But thinking about it more carefully, that makes sense—I never set up the relevant Cron, so of course scheduled publishing wouldn't work.

The fix is also simple: referring to the official docs, we add the following configuration to the wrangler.jsonc file.
{
"main": "./src/worker.ts",
"triggers": { "crons": ["* * * * *"] },
}# ./src/worker.ts
/**
* Cloudflare Worker entry.
*
* The Astro adapter's own entry only exports `fetch`, so nothing drives
* EmDash's scheduled work in production: the Cloudflare build sets
* `createScheduler = null` and expects a Cron Trigger to call
* `runScheduledTasks()` through a `scheduled()` handler. This re-export adds
* that handler to the same Worker, which is what `emdash doctor` checks for.
* Without it, scheduled posts stay `scheduled` past their publish time.
*/
export { default, PluginBridge } from "@emdash-cms/cloudflare/worker";Then we push and deploy. If you see a configuration like the one below, it means we've set it up successfully, and scheduled publishing will work as expected!




Loading comments…