Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation "Render Markup" under the "Miscellaneous" resource is designed to convert markup text into rendered HTML or another display format using a specified rendering mode. It is useful when you want to programmatically render markdown, comments, wiki pages, or files as they would appear in a Gitea repository or issue tracker context.

Common scenarios include:

  • Rendering markdown content from issues or pull requests for display in custom dashboards.
  • Converting wiki page markup into HTML for embedding in other applications.
  • Previewing file contents with proper formatting based on file type and repository context.

For example, you might input raw markdown text from an issue comment and get back the rendered HTML to show in a web app.

Properties

Name Meaning
Context URL path that provides context for rendering links within the markup (e.g., issue, media, file links). Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
File Path File path used to detect the file extension when rendering in file mode. Helps determine how to render the markup based on file type.
Mode The rendering mode to use. Options are: markdown, comment, wiki, file. This controls how the markup text is interpreted and rendered.
Text The markup text content to be rendered. This is the main input containing the raw markup that will be converted.
Wiki Boolean flag indicating if the content is a wiki page. Deprecated in favor of using mode=wiki.

Output

The output contains a JSON field with the rendered markup result. This typically includes the HTML or formatted content generated from the input markup text according to the selected mode and context.

If binary data were involved (e.g., images), it would be summarized here, but this operation focuses on textual rendering output.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in credentials.
  • Depends on the Gitea API endpoint /api/v1 for rendering markup.

Troubleshooting

  • Invalid Context Format: If the Context property does not follow the expected URL path format, rendering of links inside the markup may fail or produce incorrect URLs.
  • Unsupported Mode: Using a mode value outside the supported options (markdown, comment, wiki, file) may cause errors or unexpected rendering results.
  • Empty Text Input: Providing empty or null markup text will likely return empty output or an error.
  • Deprecated Wiki Flag: Using the deprecated Wiki boolean instead of setting Mode to wiki might lead to inconsistent behavior; prefer using the Mode property.
  • Authentication Errors: Ensure the API key credential is valid and has access to the Gitea instance; otherwise, API calls will fail.

Links and References

Discussion