Skip to content

Instantly share code, notes, and snippets.

@LesterLian
Created January 10, 2024 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LesterLian/085030d5cf315c83ae2837b2e8ab2580 to your computer and use it in GitHub Desktop.
Save LesterLian/085030d5cf315c83ae2837b2e8ab2580 to your computer and use it in GitHub Desktop.
Github Markdown API requires a JSON payload. Line breaks require special parsing.
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/markdown \
-d '{"text":'"$(cat README.md | jq -s -R '.')"'}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment