跳转到内容
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 markup document as HTML

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

MarkupOption markup 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
FilePath

File path for detecting extension in file mode

in: body

string
Mode

Mode to render (comment, gfm, markdown, file)

in: body

string
Text

Text markup to render

in: body

string
Wiki

Is it a wiki page ?

in: body

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

MarkupRender is a rendered markup document

Media typetext/html
string

APIValidationError is error format response related to input validation

Media typetext/html
message
string
url
string