Hugo uses Chroma as its code highlighter; it is built in Go and is really, really fast.
Configure syntax highlighter # See Configure Highlight.
Generate syntax highlighter CSS # If you run with markup.highlight.noClasses=false in your site configuration, you need a style sheet. The style sheet will override the style specified in markup.highlight.style.
You can generate one with Hugo:
hugo gen chromastyles --style=monokai > syntax.css Run hugo gen chromastyles -h for more options.
...
GoAT diagrams (ASCII) # Hugo natively supports [GoAT] diagrams with an [embedded code block render hook]. This means that this code block:
```goat . . . .--- 1 .-- 1 / 1 / \ | | .---+ .-+ + / \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2 + + | | | | ---+ ---+ + / \ / \ .-+-. .-+-. .+. .+. | .
...
Overview # Mathematical equations and expressions written in [LaTeX] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax] or [KaTeX].
For example, with this LaTeX markup:
\[ \begin{aligned} KL(\hat{y} || y) &= \sum_{c=1}^{M}\hat{y}_c \log{\frac{\hat{y}_c}{y_c}} \\ JS(\hat{y} || y) &= \frac{1}{2}(KL(y||\frac{y+\hat{y}}{2}) + KL(\hat{y}||\frac{y+\hat{y}}{2})) \end{aligned} \] The MathJax display engine renders this:
[ \begin{aligned} KL(\hat{y} || y) &= \sum_{c=1}^{M}\hat{y}_c \log{\frac{\hat{y}_c}{y_c}} \ JS(\hat{y} || y) &= \frac{1}{2}(KL(y||\frac{y+\hat{y}}{2}) + KL(\hat{y}||\frac{y+\hat{y}}{2})) \end{aligned} ]
...
Hugo can access and [unmarshal] local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
A data source might be a file in the data directory, a [global resource], a [page resource], or a [remote resource].
Data directory # The data directory in the root of your project may contain one or more data files, in either a flat or nested tree.
...
Overview # A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML.
Unlike templates that reside in the layouts directory, content adapters reside in the content directory, no more than one per directory per language. When a content adapter creates a page, the page’s [logical path] will be relative to the content adapter.
...