Syntax Highlighting

Note: Emanote documentation is a work-in-progress

In order to enable syntax highlighting, you must use a client-side JavaScript highlighter, such as PrismJS, and add it to page.headHtml of YAML configuration (if adding to all or multiple routes) or Markdown frontmatter (if adding to a single route):

page:
  headHtml: |
    <link href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/combine/npm/prismjs@1.23.0/prism.min.js,npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>

Example using PrismJS:

def fib(n):
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()
fib(1000)

Links to this page