What I Learned Building a Multi-Platform Publishing System
How do you publish to 5 platforms without copy-pasting? My journey from manual publishing hell to automated content distribution using Git as the single source of truth.
The Problem
I write in one place. Readers are everywhere.
I update content. Old versions live forever on different platforms.
I publish manually. Time dies with each copy-paste.
The Discovery
My content lives in Git. That's the single source of truth.
GitBook reads from Git. dev.to can read from Git. Medium can read from Git. Everything can read from Git.
So why am I copy-pasting?
The Architecture
Git (Source of Truth)
↓
GitHub (Version Control)
↓
GitBook (Primary Interface)
↓
Makefile (Publishing Engine)
├-> dev.to
├-> Medium
├-> Hashnode
└-> Anywhere
One source. Infinite destinations.
The Implementation
State Management Without Database
# .clarity/devto-articles.json
{
"article-name": "2829234", # dev.to article ID
"another-one": "2829233"
}
# .clarity/devto-checksums.json
{
"article-name": "a3f5b2c8d9e1f4g6", # MD5 hash
"another-one": "b4g6c3d0e2f5a7h8"
}
No database. Just JSON files. Git tracks them. Simple.
Change Detection Without Complexity
CURRENT_CHECKSUM=$(md5 -q article.md)
SAVED_CHECKSUM=$(jq -r '.article' .clarity/devto-checksums.json)
if [ "$CURRENT_CHECKSUM" = "$SAVED_CHECKSUM" ]; then
echo "[OK] No changes, skipping"
else
# Update only what changed
fi
MD5 hash comparison. File changed? Update. File same? Skip.
Platform Differences as Features
GitBook uses {% code %}
tags. dev.to doesn't understand them.
Solution? Strip them during publish:
CONTENT=$(cat article.md | sed 's/{% code.*%}//g')
Each platform has its reality. Adapt, don't fight.
The Workflow
Write in Markdown (Git)
Push to GitHub
GitBook auto-updates (webhook)
Run
make sync-devto
All platforms updated
One command. All platforms synced.
Real Examples from My System
Creating New Article
# Write locally
code docs/claude-ai-vibe-coding/new-article.md
# Push to Git
git add . && git commit -m "new article" && git push
# Sync everywhere
make sync-devto # Updates or creates as needed
Updating Existing Article
# Edit locally
code existing-article.md
# System detects changes via MD5
make sync-devto
# Output: [OK] Article Name - No changes, skipping
# or
# Output: -> Updating: Article Name (ID: 2829234)
Rate Limiting? Solved
if [ "$HTTP_CODE" = "429" ]; then
echo "Rate limit. Waiting 35 seconds..."
sleep 35
$(MAKE) retry
fi
Patience as code. Not error handling, feature implementation.
Why Makefile?
I used GitHub Actions. Then I woke up.
GitHub Actions = Their computer, their rules, their time. Makefile = My computer, my rules, my time.
# This runs on MY machine
publish:
@echo "I control this"
# This runs on THEIR machine
# .github/workflows/publish.yml
# I wait, I hope, I pray
Control matters more than convenience.
The Philosophy
Single Source of Truth: Git. Not Notion, not Google Docs. Git.
Platform Agnostic: Write once, publish everywhere.
Automation Over Memory: I don't remember to update. Code remembers for me.
State Without Database: JSON files in .clarity/
. Git tracks them. Done.
Adapt, Don't Force: Each platform is different. Transform content to fit.
Pattern Recognition
This isn't about blogging. It's about:
Information Flow: One source -> Many destinations
State Management: Local files > Remote databases
Change Detection: Checksums > Timestamps
Platform Reality: Transform > Complain
Control: Makefile > CI/CD services
Start Your Own
# Minimal viable publisher
sync:
@for article in docs/*.md; do \
if [ file_changed ]; then \
curl -X POST platform.com/api \
-d "$$(cat $$article)"
fi
done
Expand from here. Add state. Add checksums. Add platforms.
The Result
Write once, publish everywhere
No manual updates
No forgotten platforms
No version mismatches
Full control
My blog is everywhere. My time is mine.
Conclusion
Stop logging into platforms. Stop copy-pasting. Stop remembering to update.
Write in Git. Let Makefile handle the rest.
Publishing isn't about platforms. It's about flow.
Git -> Makefile -> World.
That's it. That's the system.
Part of the Zero Documentation -> Living Code philosophy. See also: Git as Evolution Engine - how commits become learning.
Last updated
Was this helpful?