Ornate 0.6 Manual

Code Highlighting

Code highlighting is provided through the higlightjs extension which runs highlight.js at build time in Nashorn. All languages from the highlight.js distribution are supported but only a few of them are enabled by default to improve startup time. This and other settings can be changed in the page or site configuration. These are the defaults:

# Settings for the highlight.js-based syntax highlighter
extension.highlightjs {
  # Preloaded languages. Any language that you want to access via an alias
  # should be listed here.
  preload = [scala, java, json, yaml, sql, ini, diff, bash, xml, markdown]

  # Default language when none is specified. Can be one of the supported languages,
  # an array of languages from which to pick automatically, or null or an empty array
  # for plain text. There are separate defaults for fenced code blocks, indented
  # code blocks and inline code.
  fenced    = ${extension.highlightjs.preload}
  indented  = ${extension.highlightjs.preload}
  inline    = null

  # URIs of CSS files and assorted resources required for the style
  # (relative to webjar:/highlight.js/styles/)
  styleResources = [ github-gist.css ]

  # Language codes that should not be processed by the highlighter
  ignore = []
}
ornate-reference.conf

Note: The default theme overrides any background color set by the highlight.js style.