# 转换函数
> 用这些函数把取值从一种格式转换为另一种格式。
- 本页规范地址：https://hugozh.cn/functions/transform/
- 最近更新：2026-10-02
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译

## 本章页面
- [CanHighlight](https://hugozh.cn/functions/transform/canhighlight/)：报告给定语言是否支持语法高亮。（Markdown：https://hugozh.cn/functions/transform/canhighlight/index.md）
- [Emojify](https://hugozh.cn/functions/transform/emojify/)：返回把 emoji 短代码替换为对应 emoji 字符后的给定字符串。（Markdown：https://hugozh.cn/functions/transform/emojify/index.md）
- [Highlight](https://hugozh.cn/functions/transform/highlight/)：返回用语法高亮器渲染后的给定代码。（Markdown：https://hugozh.cn/functions/transform/highlight/index.md）
- [HighlightCodeBlock](https://hugozh.cn/functions/transform/highlightcodeblock/)：返回代码块渲染钩子上下文中收到的、已高亮的代码。（Markdown：https://hugozh.cn/functions/transform/highlightcodeblock/index.md）
- [HTMLEscape](https://hugozh.cn/functions/transform/htmlescape/)：返回把特殊字符替换为 HTML 实体后的给定字符串。（Markdown：https://hugozh.cn/functions/transform/htmlescape/index.md）
- [HTMLToMarkdown](https://hugozh.cn/functions/transform/htmltomarkdown/)：返回转换为 Markdown 后的给定 HTML。（Markdown：https://hugozh.cn/functions/transform/htmltomarkdown/index.md）
- [HTMLUnescape](https://hugozh.cn/functions/transform/htmlunescape/)：返回把每个 HTML 实体替换为对应字符后的给定字符串。（Markdown：https://hugozh.cn/functions/transform/htmlunescape/index.md）
- [Markdownify](https://hugozh.cn/functions/transform/markdownify/)：返回渲染为 HTML 后的给定 Markdown。（Markdown：https://hugozh.cn/functions/transform/markdownify/index.md）
- [Plainify](https://hugozh.cn/functions/transform/plainify/)：返回删除所有 HTML 标签后的字符串。（Markdown：https://hugozh.cn/functions/transform/plainify/index.md）
- [PortableText](https://hugozh.cn/functions/transform/portabletext/)：返回转换为 Markdown 后的给定 Portable Text。（Markdown：https://hugozh.cn/functions/transform/portabletext/index.md）
- [Remarshal](https://hugozh.cn/functions/transform/remarshal/)：返回按指定格式序列化后的字符串，它由一串序列化数据或一个映射编组而成。（Markdown：https://hugozh.cn/functions/transform/remarshal/index.md）
- [ToMath](https://hugozh.cn/functions/transform/tomath/)：返回把用 LaTeX 语言书写的给定数学标记渲染为 HTML 后的结果。（Markdown：https://hugozh.cn/functions/transform/tomath/index.md）
- [Unmarshal](https://hugozh.cn/functions/transform/unmarshal/)：返回从 CSV、JSON、TOML、YAML 或 XML 格式的序列化数据解析出的映射或数组。（Markdown：https://hugozh.cn/functions/transform/unmarshal/index.md）
- [XMLEscape](https://hugozh.cn/functions/transform/xmlescape/)：返回删除不允许的字符后再转义为对应 XML 形式的给定字符串。（Markdown：https://hugozh.cn/functions/transform/xmlescape/index.md）

---
