How to Add a Blog to Your Lovable App
Your Lovable app can have a real blog: a /blog index, post pages with proper SEO tags, and an endpoint that content tools can publish into. Setup takes about two minutes and needs no plugin and no code on your side, because Lovable builds all of it from one prompt.
This guide shows the whole flow, plus the exact things the prompt must say to get a blog that ranks instead of a decoration.
Why there is no plugin for this
Lovable has no publishing API today. The public surface is Build with URL, which creates new apps, and an MCP server whose OAuth flow only works from ChatGPT, Claude, Cursor and VS Code. A backend that wants to deliver articles on a schedule cannot connect to either.
But every Lovable app already has a real backend (Lovable Cloud or Supabase) and an AI that writes code on request. So the fix is to flip the problem: don't wait for Lovable's API. Have your app grow one endpoint of its own.
Step 1: Get the prompt
We keep the full battle-tested prompt on our Lovable integration page, free to copy even if you never use blogr. If you'd rather write your own, it must ask Lovable for three things:
-
Storage. A
blog_poststable with title, slug, Markdown and HTML bodies, meta title, meta description, cover image URL and alt text, categories, tags, and a numeric external id for upserts. -
Public pages. An index at
/blogand a post page at/blog/{slug}that renders the stored HTML. Spell out that the meta title, meta description, og:image and Article JSON-LD must be present in the served HTML. Left unsaid, you get client-side-only meta tags, and crawlers may never see them. -
A receiving endpoint.
POST /api/articles, checked against a bearer token stored as a backend secret. It should answer 200 to test deliveries without saving, upsert real ones on the external id or slug, and reply with the post's live URL.
Step 2: Paste it into Lovable
Open your Lovable app's chat and paste the prompt. Lovable creates the table, the pages and the endpoint in whatever stack your app already uses.
Two rules learned the hard way:
- Never paste the token itself into the chat. The prompt should tell Lovable to create a secret (ours names it
BLOGR_ACCESS_TOKEN) and ask you for the value. You supply it through Lovable's secrets manager, so it stays out of the transcript and out of frontend code. - Wait for the report. The prompt should end by telling Lovable to state the finished endpoint's full URL, something like
https://your-app.lovable.app/api/articles. That is the address everything else needs.
Step 3: Connect your publisher
If you use blogr.ai: open Setup → Publishing, pick Lovable, paste the endpoint URL, and click Test Your Connection. The test delivers a fake article flagged test: true in the exact shape of a real one, so you can prove the endpoint works before anything ships. Save, and every article you approve publishes itself, cover image and structured data included.
No blogr? The endpoint is yours, so anything that can send an HTTP request can publish:
curl -X POST https://your-app.lovable.app/api/articles \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"event": "article.published",
"test": false,
"article": {
"id": 1,
"title": "Hello from my blog",
"slug": "hello-from-my-blog",
"content_html": "<h1>Hello</h1><p>First post.</p>",
"content_markdown": "# Hello\n\nFirst post.",
"seo": {"title": "Hello", "meta_description": "First post."}
}
}'
The checklist for a blog that ranks
Whatever tool fills the blog, verify these on the live pages:
- View source shows the tags. The title, meta description, og:image and Article JSON-LD sit in the HTML the server sends, not injected later by JavaScript.
- Repeat deliveries update, never duplicate. Send the same article twice; you should still have one post. If not, the endpoint is missing its upsert.
- The token check lives in the backend. If you can find your token anywhere in the app's frontend code, every visitor can too. Ask Lovable to move it.
- The endpoint answers fast. Publishers time out; ours gives an endpoint 15 seconds. Store the post and respond, don't do heavy work inline.
Why we like this pattern
We built this because customers kept asking, and it has quietly become our favorite integration. There is no SDK to version and no dependency on Lovable's roadmap. The glue code adapts to each app, because the app's own AI writes it. The prompt doubles as documentation. And setup beats most OAuth flows we have shipped.
The tradeoff is real too: you are trusting an AI to build the receiving side, which is why the prompt reads like a spec for a distracted contractor and why the test delivery exists. If the endpoint later breaks, the fix is usually pasting the error message back into Lovable's chat.
Vibe-coded apps are becoming a real segment, and most have no API for anything. We suspect "the integration is a prompt" stops being a workaround and starts being a category.
Ready to fill that blog with articles? The full prompt, payload contract and setup walkthrough live in our Lovable docs.