Skip to content

Latest commit

 

History

History

Miscellaneous

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Miscellaneous

Markdown

Render an arbitrary Markdown document

POST /markdown 

Parameters

NameTypeDescription
textstringRequired The Markdown text to render
contextstringThe repository context, e.g. https://github.com/gogs/gogs

Example

{ "text": "Hello world gogs/gogs#1 **cool**, and #1!", "context": "https://github.com/gogs/gogs" }

Response

Status: 200 OK Content-Type: text/html 
<p>Hello world <ahref="https://try.gogs.io/gogs/gogs/issues/1" rel="nofollow">gogs/gogs#1</a><strong>cool</strong>, and <ahref="https://github.com/gogs/gogs/issues/1" rel="nofollow">#1</a>!</p>

Render a Markdown document in raw mode

POST /markdown/raw 

Parameters

The raw API takes a Markdown document as plaintext(text/plain) and renders it as plain Markdown without a repository context.

Response

Status: 200 OK Content-Type: text/html 
<p>Hello world gogs/gogs#1 <strong>cool</strong>, and #1!</p>
close