跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

Render a markdown document as HTML

POST
/markdown
curl --request POST \
--url https://gitea.example.com/api/v1/markdown \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "Context": "example", "Mode": "example", "Text": "example", "Wiki": true }'
Media typeapplication/json

MarkdownOption markdown options

object
Context

URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}

in: body

string
Mode

Mode to render (comment, gfm, markdown)

in: body

string
Text

Text markdown to render

in: body

string
Wiki

Is it a wiki page ?

in: body

boolean
Examplegenerated
{
"Context": "example",
"Mode": "example",
"Text": "example",
"Wiki": true
}

MarkdownRender is a rendered markdown document

Media typetext/html
string

APIValidationError is error format response related to input validation

Media typetext/html
message
string
url
string