md2we-share-page
Use MD2WE's online share and image upload APIs.
When To Use
Use this skill when the user wants to:
- Generate a public share page from Markdown
- Get a share URL and QR-ready payload
- Upload a local image into MD2WE storage
- Turn a local image into Markdown syntax
Service Check
export MD2WE_BASE_URL="${MD2WE_BASE_URL:-https://md2we.com}"
curl -sS "${MD2WE_BASE_URL}/api/health"
If needed, start the local MD2WE server from the repo root:
python3 app.py
Then point the base URL to the local service and retry /api/health:
export MD2WE_BASE_URL="http://127.0.0.1:5566"
curl -sS "${MD2WE_BASE_URL}/api/health"
API Call Pattern
Create a share page:
curl -sS "${MD2WE_BASE_URL}/api/share" \
-H "Content-Type: application/json" \
-d @<(jq -Rs '{
markdown: .,
theme: "default",
code_theme: "github",
font_size: "medium",
background: "warm"
}' article.md)
Upload an image and get Markdown:
curl -sS "${MD2WE_BASE_URL}/api/upload/image" \
-F "image=@./cover.png"
Notes
- Each
sharecall creates a new share page. - Uploaded images must be JPG, PNG, WebP, or GIF, and under 10 MB.
- Read
share_url,share_id,qr_svg,image_url, andmarkdownfrom the JSON result. - If the user wants the Markdown inserted into a file, update the target file after the upload succeeds.