Publish Markdown files to Z-Blog with the local XML-RPC CLI in this workspace.
1. Ensure credentials are available via args or environment variables: ZBLOG_ENDPOINT, ZBLOG_USERNAME, ZBLOG_PASSWORD, optional ZBLOG_BLOG_ID.
2. Run:
node openclaw-zblog-markdown-publisher/scripts/publish-markdown.mjs \
--markdown-file /absolute/path/to/article.md
3. If needed, override metadata:
node openclaw-zblog-markdown-publisher/scripts/publish-markdown.mjs \
--markdown-file /absolute/path/to/article.md \
--title "覆盖标题" \
--categories 默认分类,技术 \
--tags Openclaw,自动发布 \
--draft
Read front matter automatically from the Markdown file and map fields to post payload:
- title -> post title
categories -> categories listtags -> tags listexcerpt -> excerptslug -> slugdraft -> draft mode (true means save draft)Use this format:
---正文内容...
If title is missing, resolve title in this order:
1. --title argument
2. front matter title
3. first Markdown H1 (# ...)
4. Markdown file name (without extension)
1. Validate connectivity first when endpoint uncertainty exists:
node zblog-xmlrpc.mjs check --endpoint https://example.com/zb_system/xml-rpc/index.php
2. Publish one file using the wrapper script above.
3. Report the returned postId and whether it was published or draft.
4. If XML-RPC returns HTML or a PHP fatal page, stop and report server-side issue instead of retrying blindly.
- scripts/publish-markdown.mjs: stable invocation entry for agents; forwards parameters to zblog-xmlrpc.mjs publish.