2019-10-21 04:22:28 -04:00
|
|
|
---
|
|
|
|
title: highlight
|
|
|
|
linktitle: highlight
|
2019-11-06 14:10:47 -05:00
|
|
|
description: Takes a string of code and language declaration and uses Chroma to return syntax-highlighted HTML.
|
2019-10-21 04:22:28 -04:00
|
|
|
godocref:
|
|
|
|
date: 2017-02-01
|
|
|
|
publishdate: 2017-02-01
|
|
|
|
lastmod: 2017-02-01
|
|
|
|
categories: [functions]
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: "functions"
|
2019-11-06 14:10:47 -05:00
|
|
|
keywords: [highlighting,code blocks,syntax]
|
2019-10-21 04:22:28 -04:00
|
|
|
signature: ["highlight INPUT LANG OPTIONS"]
|
|
|
|
workson: []
|
|
|
|
hugoversion:
|
|
|
|
relatedfuncs: []
|
|
|
|
deprecated: false
|
|
|
|
---
|
|
|
|
|
|
|
|
[`highlight` is used in Hugo's built-in `highlight` shortcode][highlight].
|
|
|
|
|
|
|
|
|
|
|
|
[highlight]: /content-management/shortcodes/#highlight
|
|
|
|
[installpygments]: /getting-started/installing/#installing-pygments-optional
|
|
|
|
[syntax]: /content-management/syntax-highlighting/
|