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):

  headHtml: |
    <link href="" rel="stylesheet" />
    <script src=",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

Links to this page