Files
hugo/docs/content/en/functions/transform/HTMLtoMarkdown.md
T
2025-12-19 10:07:30 +01:00

1.0 KiB

title, description, categories, keywords, params
title description categories keywords params
transform.HTMLToMarkdown Converts HTML to Markdown.
functions_and_methods
returnType signatures
string
transform.HTMLToMarkdown INPUT

{{< new-in "0.151.0" />}}

Note

This function is experimental and its API may change in the future.

The transform.HTMLToMarkdown function converts HTML to Markdown by utilizing the html-to-markdown Go package.

Usage

{{ .Content | transform.HTMLToMarkdown | safeHTML }}

Plugins

The conversion process is enabled by the following html-to-markdown plugins:

Plugin Description
Base Implements basic shared functionality
CommonMark Implements Markdown according to the Commonmark Spec
Table Implements tables according to the GitHub Flavored Markdown Spec