Extended Markdown ✍️

Note: Emanote documentation is a work-in-progress

Emanote notes are written in Markdown format. A tutorial is available here. Below we shall highlight some of the commonmark extensions that Emanote supports on top of standard Mardown syntax.

You can link to a note by placing the filename (without extension) inside double square brackets. For example, [[neuron]] links to the file neuron.md and it will be rendered as Migrating from neuron. Note that it is using the title of the note automatically; you can specify a custom title as [[neuron|Moving off neuron]] which renders as Moving off neuron or even force use of filename with [[neuron|neuron]] which renders as neuron.

Broken links render differently, for example: [[Foo bar]] (if a wiki-link) or [Foo bar](foo-bar.md) (if a regular Markdown link).

Emojis

😄

🏃 🐜

See list of available emojis for reference.

Footnotes

https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/footnotes.md

Demo: Checkout this note 1 and this other note 2 as both are footnotes. You may also reuse 1 footnotes.

Task lists

  • A list item with no task marker

Tasks can also be written outside of list context, such as paragraphs:

Unchecked tasks will appear in the task index available at /-/tasks.

Definition lists

https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md

Fruits
Apples
Oranges
Animal Foods
Eggs
Diary
Offal
Muscle meat

Lists

Simple lists,

  • Apple
  • Orange
  • Mango

Lists with sub-lists,

  • Muscle meat
  • Offal
    • Liver
    • Heart
  • Misc
    • Bone Marrow
    • Cartillage
    • Skin

List items can contain multiple block elements (eg: paragraph),

  • Meat is the only nutritionally complete food

  • Animal foods contain all of the protein, fat, vitamins and minerals that humans need to function.

    They contain absolutely everything we need in just the right proportions.

  • In contrast to vegetables, meat does not contain any “anti-nutrients”

Ordered lists,

  • Be happy
  • Be harmless
  • Be naive

Tables

CategoryFavourite
Web BrowserBrave
Search EngineBrave Search
ChatElement

(Note that wiki links with a custom text must have their pipe escaped when used inside tables.)

Hash Tags

Add Twitter-like hashtags anywhere in Markdown file. They can also be added to the YAML frontmatter. Hash tags can also be “hierarchical”, for instance: #emanote/syntax/demo

Highlighting

You can highlight any inline text by wraping them in == (ie. ==inline text==). 3 The CSS style for highlighted inlines can be specified in index.yaml. Regular Markdown syntax, including emojis, can be mixed in with highlighted inlines to 🍓 give a distinction on top of it all.

More extensions

Syntax Highlighting

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)

Mermaid Diagrams

Footnotes
1.
First footnote example
2.
Second footnote example. Footnotes within* footnotes are not handled.
3.
See original proposal for this syntax here.
#emanote/syntax/demo