Repository navigation
Publishing multilingual articles into Payload 3 from Markdown (Lexical converter + agent skill) #18336
apoi15
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I run a Payload 3 + Next.js site that publishes every article in English, Spanish
and French. Writing them through the admin was slow, and letting an AI agent fill
forms or call the REST API gave different results every run. So I moved the whole
thing to Markdown files plus one script that is the only thing allowed to write
articles, and open-sourced it:
https://github.com/apoi15/payload-blog-publish-skill
What might be useful even if you don't use an AI agent:
##/###, lists, links, tables,images and
:::callout/:::cta/:::videomap 1:1 onto Lexical nodes andcustom blocks. Anything it can't represent (H1, code fences, HTML, nested lists…)
is rejected with a line number instead of approximated.
blog:publish: dry run by default,--applywrites all locales, then readsthe article back and compares it with the source.
blog:export: lossless export of a live article back to Markdown, so editsmade in the admin aren't lost.
DATABASE_URLhost, and refuses towrite production unless that one command carries
ALLOW_PRODUCTION_DB=true.app/api/revalidateroute.The
SKILL.mdlets Claude Code, Codex or any agent run the full pipeline: research,drafts per locale, dry run, dev DB, then production.
A live example, published in three languages with this workflow:
https://www.hlnapparel.com/blog/ai-tech-pack
examples/includes a matchingArticlescollection and the Lexical blocks.Feedback on the converter's mapping is very welcome.
All reactions