The last mile from draft to live post. Image generation, LinkedIn teasers, one-command deployment, and the analytics feedback loop that closes the content cycle.
AI Content Pipeline Deep Dive (5/5): Publishing
written by Stefan Christoph
- 15 minutes read
TL;DR: Publishing isn’t just “click deploy.” It’s image generation guided by performance data, LinkedIn teasers written from analytics insights, one-command deployment that handles auth, build, deploy, and verification in a single invocation, and a feedback loop where post performance reshapes future content decisions. This post shows the full last-mile automation — with the actual constraint files that drive it.
This is Part 5 of a five-part series. Previous parts: Ingestion, Research, Collaborative Writing, Editing. This post covers the final phase: turning a polished draft into a live post that finds its audience.
Where this post sits in the pipeline — Stage 5 of 5: Publishing.
The Last Mile Problem
You’ve written the post. It survived challenging questions, AI smell check, critical reader pass. The content is solid.
Now what?
Nine mechanical steps stand between “done writing” and “live on the internet.” Generate a cover image that matches the content. Write a LinkedIn teaser that hooks readers without summarizing the article. Convert markdown to Hugo’s format. Copy and rename image assets to the correct directories. Pre-render Mermaid diagrams to static SVG because your blog doesn’t ship client-side JavaScript. Build the site. Deploy to production. Verify the deployment actually worked. Schedule the LinkedIn teaser for the optimal time slot.
Each step is trivial in isolation. Together, they consume 30-45 minutes of mechanical work: image generation and selection (5-10 min), teaser writing and iteration (10-15 min), file conversion and copying (5 min), Mermaid rendering (2-3 min), build-deploy-verify (3-5 min), LinkedIn scheduling (2-3 min). Every single time you publish.
That’s the tax. And it’s the reason most people’s publishing cadence decays. Not because they run out of ideas, but because the last mile is tedious enough to skip “just this once.” Then once becomes always.
The pipeline compresses this to roughly two minutes of human time: review the prepared artifacts, confirm, and watch it deploy.
Step 12: Image Generation — Data Over Aesthetics
Steps are numbered from the full 17-step pipeline. Steps 1-11 cover research through editing (Part 2-4).
Images aren’t decoration. On LinkedIn, posts with images consistently outperform text-only posts. In my own analytics across 28 tracked posts, the difference is typically 2-3x in impressions (though it varies by topic and hook quality). But not any image. The pipeline uses performance data to guide generation.
Here’s the actual constraint block that governs image creation:
Image generation constraints (from the post-creation skill):
LinkedIn image rules (from performance data):PREFER:- Human presence- Warm/natural lighting- Story-telling composition- Authentic/editorial feel- Workspace scenesAVOID:- Dark neon "tech" aesthetic- Infographic-style with text overlays- Overly literal metaphors (industrial pipelines, glowing shields)- Generic cybersecurity imageryHard rules:- Image MUST match the teaser's narrative arc, not just the article topic- Image MUST stand out against the typical dark-background LinkedIn feed- Create at least 3 prompt options with different visual angles- Do NOT include text overlays (AI renders text poorly)- Do NOT use special characters in filenames (breaks Obsidian embeds)
The “from performance data” part is the key phrase. These aren’t aesthetic preferences I invented. They’re derived from analyzing which of my posts got the most engagement and what their images had in common. The “Hackathon in a Hackathon” post (warm lighting, real scene, human presence) hit 1,197 impressions with 2.7% engagement. The “Agent Security Stack” post (dark neon tech aesthetic) landed at 368 impressions. Same author, same audience, same week. The image was the variable.
Image generation is stochastic. You can’t guarantee quality on any single attempt. The pipeline manages this by generating three options with different visual angles, then the human picks. Sometimes all three are mediocre and you regenerate with adjusted prompts. The constraints reduce the failure space but don’t eliminate it. Typically one of three is usable; occasionally it takes two rounds.
The Avatar Composite: Building Visual Identity
One format that performs consistently well: a composite image combining my avatar with a thought bubble containing a punchy quote from the article. It creates recognition. Readers scrolling LinkedIn start to identify the format before reading the text, and that recognition compounds over time.
Avatar composite positioning (from the skill):
Avatar composite constraints:- Use avatar at 09-assets/avatar/styles/03-comic-book-conf.png- Remove background using rembg- Resize avatar to 70% of hero image height- Position flush-left (x=0), bottom-aligned- Draw ellipse thought bubble:- 4px black outline, white fill- 60px horizontal padding, 40px vertical inside ellipse- Helvetica 39px for bubble text- Plain ASCII only (no special chars — Pillow renders them as boxes)- 2trailing thought ellipses descending from bubble toward avatar head- Extract quote from TL;DR or strongest opening statement- Keep to 2-3 short lines that work as standalone hook
The specificity matters. “Helvetica 39px” isn’t arbitrary; it’s the size that remains readable at LinkedIn’s thumbnail resolution while fitting 2-3 lines inside the bubble without overflow. These numbers were tuned across roughly 20 posts. Each one that looked wrong taught something about positioning, font size, or padding.
Step 14: LinkedIn Teaser — Hooks, Not Summaries
The teaser is not a summary of the article. This distinction is critical and most people get it wrong. A summary tells readers what the article says, which removes the reason to click. A hook creates tension that only the article resolves.
The constraints are derived directly from analytics. Specifically, from comparing the first-day impressions of posts with different hook structures:
Teaser writing rules (derived from performance data):
Teaser rules:1. Lead with a contrarian hook — not a summary of the article2. Make the "so what" immediate — first 2 lines answer "why should I care?"3. Include a clear stance — don't be neutral, argue something4. End with a question — drives comments, which drive reach5. Mention concrete examples — code, numbers, specific tools signal depth6. Keep it short — 4-6 short paragraphs, not walls of textTechnical constraints:- Include article URL with ?utm=linkedin tracking parameter- Include 3-6 relevant hashtags- Use Unicode bold (𝗔𝗕𝗖) for emphasis — markdown doesn't render on LinkedIn- Present 2 options (different hook angles) for user to choose- Save ONLY the chosen option — ready to copy-paste with zero editing- NEVER use "Read the full article below" — that's for native articles- Teasers drive traffic to the website; the link must be explicit
Example: Two Hook Angles for the Same Article
For the “732-Byte Wake-Up Call” post about a Linux kernel exploit and AI-driven vulnerability discovery, the agent generated two options:
Option A (fear angle):
A 27-year-old bug. 732 bytes. Root access on every mainstream Linux distribution.
That’s not the scary part. The scary part is who found it.
Option B (paradigm shift angle):
The security equilibrium just shifted. Not because of a new attack tool. Because AI can now find bugs that humans missed for 27 years.
Both are valid hooks. They attract different readers. I chose Option A because fear is a stronger scroll-stopper than intellectual curiosity. The data confirmed it: that post got 3x the typical first-day impressions.
The pipeline always generates two options because the “right” hook depends on the audience’s current mood, the news cycle, and what else is in their feed that day. Having options means you’re choosing, not settling.
Why “End With a Question” Works
LinkedIn’s algorithm in 2026 prioritizes depth of engagement over breadth of reach [1]. Comments signal depth. Questions drive comments. Every high-comment post in my analytics ends with a genuine question, not a rhetorical one, but something readers actually want to answer from their own experience.
The correlation is strong enough that it’s now a hard constraint in the teaser rules, not a suggestion.
Steps 15-16: Deployment — One Command, Live Post
Here’s where the pipeline pays for itself most visibly. Deployment is a single command that triggers the entire chain from draft to live site.
The concept is simple: a sequence of scripts that authenticate, build, deploy, and verify. Each step is idempotent. If the build fails (usually a formatting error), the agent shows the error and fixes it. If deployment fails, retry. The human gate before deployment means failures are caught before anything goes live.
The deployment pattern:
Pipeline steps:1. Authenticate with hosting provider2. Build static site from markdown sources3. Deploy (git push triggers auto-deploy)4. Poll the live URL until HTTP 200 confirms it's upHuman gate:Agent prepares everything, presents for review.Human confirms. Then it deploys.Nothing goes live without explicit approval.
But deployment is only the final step. Before that command runs, the pipeline handles the conversion from draft to publish-ready format:
Pre-deployment conversion:
Steps:1. Read vault draft (post + images + metadata)2. Generate images if prompts exist but no assets yet3. Convert frontmatter to publishing format:- Generate URL slug- Set SEO description (max 155 chars)- Set featured image path- Strip draft-only fields4. Place images throughout the post (not clustered)5. Pre-render diagrams to SVG (verify accessibility contrast)6. Write final post to publishing directory7. Update vault draft with the live URL
Total time from “publish this” to live post: under two minutes. The same process manually takes 15-20 minutes and is error-prone — wrong image path, forgotten metadata field, stale build cache, diagram with unreadable contrast.
The specific tools don’t matter. I use a static site generator with git-based deployment, but the pattern works with any publishing stack. What matters is: single command, human gate, automated verification, and idempotent steps that can be retried without side effects.
The Browser Self-Review
One step that catches surprisingly many issues: after writing the Hugo post and starting the dev server, the agent reviews the rendered page itself before presenting to the user.
Browser self-review checks (from the publish-website skill):
Known rendering issues to check:- Sources as single paragraph (needs list markers or blank lines)- Broken tables (wrong column count)- Missing images (broken figure shortcode paths)- Collapsed blockquotes (TL;DR not rendering as blockquote)- Raw shortcode text (
appearing as literal text)- Duplicate hero image (featured_image + inline figure = same image twice)
This catches Hugo-specific rendering problems that look fine in the markdown source but break in the browser. The “sources as single paragraph” issue alone has bitten me three times — footnote-style references need blank lines between them in Hugo, even though they render fine in Obsidian without them.
The Consistency Check: Trust But Verify
Before anything goes live, the pipeline runs a mandatory consistency and link verification pass. This step is non-negotiable — it runs every time, even when the content “looks fine.”
Consistency check constraints (from the publish-website skill):
Mandatory pre-publish verification:1. Cross-check every factual claim in teaser against blog post:- Session codes, times, titles, descriptions- Numbers, customer names, speaker names- Any mismatch is a blocker — fix before publishing2. Extract ALL URLs from blog post + teaser:- Verify each returns HTTP 200 (curl with 10s timeout)- Non-200 is a blocker — fix or remove3. Verify every referenced image exists on disk:- Extract paths from featured_image, figure shortcodes, markdown images- Check each file under site/static/- Missing image is a blocker4. Check for duplicate/redundant paragraphs in teaser5. Present summary table:links (URL + status), images (path + exists),consistency items, issues found6. Do NOT proceed until all checks pass
This step exists because I’ve published posts with broken links, mismatched numbers between teaser and article, and missing images that showed as broken placeholders. Each error erodes reader trust. The verification takes 30 seconds of compute time and has caught issues in roughly one out of every four publications.
The Analytics Feedback Loop
Publishing isn’t the end. It’s the beginning of the feedback loop that makes the next post better.
The pipeline collects LinkedIn analytics daily — impressions, reach, reactions, comments, reposts, profile viewers, followers gained. Per-post performance with day-over-day deltas. This data feeds back into four areas:
1. Image generation — which visual styles correlate with higher engagement? Dark neon dropped after three consecutive underperformers. Warm lighting and human presence stayed after consistent outperformance.
2. Teaser writing — which hook patterns drive more comments? The “end with a question” rule emerged from noticing every high-comment post did this. The “contrarian hook” rule emerged from comparing first-line structures across 28 posts.
3. Topic selection — which themes resonate with the audience? “AI + practical implementation” consistently outperforms “AI + economics” or “AI + philosophy” for my specific audience. The data says so; my intuition would have predicted otherwise.
4. Timing — which posting times get the most initial traction? Monday/Wednesday/Friday at 08:30 CET consistently outperforms Tuesday/Thursday at 12:00. The difference is roughly 2x in first-day impressions.
From the content plan insights note (numbers are illustrative examples):
Scheduling rules (derived from 28 posts):Primary slots:Mon, Wed, Fri at 08:30 CET — proven performersTue/Thu 12:00:Experimental only. Strong posts only, not filler3 posts/week:Sustainable ceiling. 5/week dilutes per-post performanceTrend data (March-May 2026):Mid-March:7,000+ avg impressions (CLI vs MCP outlier at 37K)Late March:2,000-8,000(strong period)Late April:2,200(still healthy)Week of May 4:802avg (5/week volume fatigue)Hypothesis:Volume fatigue + weaker titles + zero follower growthAction:Strict 3/week for recovery, stronger titles, test 15:00 slot
The feedback loop is what turns a content pipeline into a content system. Without it, you’re publishing into the void and hoping. With it, every post teaches you something about what your audience values, and that learning compounds.
Format rules update monthly based on accumulated data. Topic selection updates weekly based on what resonated. The cadence isn’t arbitrary; it’s derived from watching what happens when you change it.
The Complete Pipeline: End to End
From idea to published post with analytics feedback:
Total human time per post: 1-2 hours of actual thinking and writing. Total agent time: 2-3 hours of research, verification, and mechanical work. Total wall-clock time: same day, from idea to published.
The first few posts took longer — the constraints were being tuned, the voice reference was thin, the analytics hadn’t accumulated enough data to be useful. By post 15, the pipeline was self-reinforcing. By post 28, the constraints were stable enough to document in this series.
Making It Replicable
The publishing phase is the most tool-specific part of the pipeline. Your blog engine, hosting provider, and social platform will differ. But the patterns transfer regardless of implementation:
Use performance data to guide visuals. Track what works. Encode it as constraints. Don’t rely on aesthetic intuition alone. Your intuition is biased toward what you like, not what your audience engages with.
Write teasers from analytics insights, not from the article summary. The teaser’s job is to create tension, not to inform. Study which of your hooks drove the most comments, then encode those patterns as rules.
Automate the mechanical deployment steps. Every manual step is a friction point you’ll eventually skip. The skip becomes a habit. The habit becomes “I haven’t published in three weeks.” One-command deployment removes the excuse.
Close the feedback loop. Collect performance data. Let it inform future decisions. Update your constraints quarterly. Without this, you’re optimizing based on memory and gut feel. Both of which degrade over time.
Keep a human gate before going live. Automation prepares. Human confirms. This isn’t about distrust of the pipeline — it’s about maintaining the editorial standard that makes the content worth reading. The gate takes 30 seconds and catches the one-in-four issues that would otherwise go live.
The Series in Review
Over five posts, we’ve covered the complete pipeline:
The through-line across all five: agents handle volume and mechanics, humans handle judgment and creativity. The pipeline makes that division of labor explicit, repeatable, and sustainable at three posts per week.
You don’t need all five phases to start. Begin with research and editing — those require nothing but a conversation with an AI model and something you want to understand better. Add automation as the friction becomes obvious. Each phase you add reduces friction in the next, so the pipeline builds momentum incrementally.
The cold-start problem solves itself within two weeks. Your first three posts become the voice reference for the fourth. Your first research session populates the knowledge base for the next. Your first week of analytics gives you enough data to make one scheduling decision. Momentum compounds. The question isn’t whether the tools are ready. They are. The question is whether you’ll build the pipeline.
Sources
[1] LinkedIn Algorithm 2026: Content distribution now prioritizes topical relevance and engagement depth over connection overlap. https://nealschaffer.com/linkedin-post/
Stefan Christoph is a Principal Solutions Architect at AWS, focused on agentic AI, media & entertainment, and helping builders move from demo to production. He writes about AI architecture, developer productivity, and the future of software.
This is a personal blog. Opinions expressed here are my own and do not represent the views or positions of my employer.