How to use markdown in Juicebox docs

Markdown makes sections and code blocks easy, but cross-referencing hard.

  • Wrap lines at 80 characters
  • EVERY section title must be unique.

Code blocks in Markdown

Code blocks are easy with triple back-ticks. Here's an example

def a():
  return 2.0

Here's some python highlighted code.

class PostInsightCommand(PostToSlackCommand):
    """
    Post a snapshot to slack.

    Requires hook_url to be configured in app.metadata.
    Text and image_title can also be configured in app.metadata to
    customize this command.
    """

    class Meta:
        name = 'post-insight'
        label = 'Post an insight'
        icon = 'icon-lightbulb-o'
        data_type = 'slice'
        context = 'slice'
        response_action = 'display'

Using directives

Wrap restructured text directives as follows.

An example code-block with everything turned on.
1
2
3
4
5
# Comment line
import System
System.run_emphasis_line
# Long lines in code blocks create a auto horizontal scrollbar
System.exit!

Some directives don't work.