hugoDocs/content/functions/highlight.md
2017-03-27 16:32:31 -05:00

975 B

title linktitle description godocref date publishdate lastmod categories tags ns signature workson hugoversion relatedfuncs deprecated
highlight highlight Takes a string of code and language declaration and uses Pygments to return syntax-highlighted HTML with inline-styles. 2017-02-01 2017-02-01 2017-02-01
functions
highlighting
pygments
code blocks
syntax
highlight INPUT
false

highlight takes a string of code and a language and then uses Pygments to return the syntax highlighted code in HTML.

highlight is used in Hugo's built-in highlight shortcode.

See Installing Hugo for more information on Pygments or Syntax Highlighting for more options on how to add syntax highlighting to your code blocks with Hugo.