Render Markdown to beautifully styled articles and publish to content platforms — powered by Docker.
This image bundles wenyan CLI and all required runtime dependencies. No local Node.js or npm environment required.
docker pull caol64/wenyan-cli
docker run --rm caol64/wenyan-cli --help
Render and publish a Markdown file to WeChat Official Account draft box:
docker run --rm \
--env-file .env \
-e HOST_FILE_PATH=$(pwd) \
-v $(pwd):/mnt/host-downloads \
caol64/wenyan-cli \
publish -f ./article.md
Render Markdown content directly:
docker run --rm caol64/wenyan-cli \
render "# Hello Wenyan"
When using local Markdown or image files, mount the current directory:
docker run --rm \
-e HOST_FILE_PATH=$(pwd) \
-v $(pwd):/mnt/host-downloads \
caol64/wenyan-cli \
publish -f ./example.md
How it works:
| Path | Description |
|---|---|
HOST_FILE_PATH | Absolute path on host machine |
/mnt/host-downloads | Mounted path inside container |
All file paths in Markdown (cover / images) should reference host paths.
publish supports exactly one input source:
-f <file> — read Markdown from local file<input-content> — inline Markdown stringstdin — pipe from another commandExamples:
cat article.md | docker run --rm -i caol64/wenyan-cli render
docker run --rm caol64/wenyan-cli render "# Title"
Commonly used options:
-t, --theme — theme ID (default: default)-h, --highlight — code highlight theme--no-mac-style — disable macOS-style code blocks--no-footnote — disable link-to-footnote conversionEach Markdown file must include frontmatter:
---
title: My Article Title
cover: /absolute/path/to/cover.jpg
---
title — article title (required)cover — optional cover image (local or remote)Publishing to WeChat requires:
WECHAT_APP_IDWECHAT_APP_SECRETRecommended usage with .env file:
WECHAT_APP_ID=xxx
WECHAT_APP_SECRET=yyy
wenyanlinux/amd64, linux/arm64Apache License Version 2.0
For frequent usage, create an alias:
alias wenyan='docker run --rm \
-e HOST_FILE_PATH=$(pwd) \
-v $(pwd):/mnt/host-downloads \
caol64/wenyan-cli'
Then use it like a native CLI:
wenyan publish -f article.md
Content type
Image
Digest
sha256:b0992f970…
Size
105.7 MB
Last updated
7 days ago
docker pull caol64/wenyan-cli