Liking cljdoc? Tell your friends :D

cljdoc CommonMark features

Introduction

A test CommonMark doc to exercise cljdoc formatting and features.

This document exists to compare basic features with AsciiDoctor. If you edit this doc please also edit its AsciiDoctor counterpart.

CommonMark is also supported in docstrings, have a look at cljdoc-exerciser namespace on cljdoc.org for some more examples.

Formatting marks

I have a strong feeling that I might be headstrong.

If I use italics does that make things more gleanable?

Does this ~~strike~~ you as a ~~cross~~word?

My code was encodeded.

Code blocks

Here we have some clojure code:

;; some sweet clojure code

(defn hello-earthling
  "Greet an earthling in a believable way."
  [name]
  (println "Hello earthling " (uppercase name)))

If we specify Clojure-Repl to CommonMark as our language, we can invoke special highlighting for a repl session:

user=> (require '[clojure.string :as string])
nil
user=> (string/reverse "step on no pets")
"step on no pets"
user=> (reduce + 0 [1 2 3 4 5 6 7 8 6])
42
user=>

Lists

Bulleted:

  • apples
  • orange
    • temple
    • navel
  • bananas

Numbered:

  1. first
    1. a
    2. b
      1. x
      2. y
  2. second
  3. third

Mixed:

  • Hey
    1. one
    2. two
  • Ho
    • Ho
      1. uno
      2. dos

With code:

  1. one
    1. two

      I am a code block
      
    2. three

Quoted text

Quoted text.

Another paragraph in quote.

Images

This local image should work on github and cljdoc.

A local test image should appear here

Here's a remote image:

A remote test image should appear here

Links

Local link: cljdoc asciidoc features

External link: GitHub Flavored Markdown Spec

Link to anchor: Anchored heading

Note: WikiLinks to api functions do not work here, they only work in doc strings.

Let's try referencing our APIs:

  1. A link to cljdoc-exerciser.core/excercise3
  2. A link to cljdoc-exerciser.core

Headings

Level 3

Level 4

Level 5
Level 6

Horizontal rule

This is how a horizontal rule is rendered:


Tables

CommonMark tables are considered an extension to the CommonMark format.

Here is the most basic example:

Heading 1Heading 2
col1, row1col2, row1
col1, row2col2, row2
col1, row3col2, row3
col1, row4col2, row4

Basic alignment support is also available:

Right aligned colCentered colLeft aligned Col
amisany
Ithisthing
right?centered?left?

Emojis

GitHub flavored markdown supports emojis.

:space_invader: :apple: :space_invader: :tangerine: :space_invader:

Anchored heading

And here we are.

Admonitions

CommonMark does not support admonitions

Text Roles

There is no support for in CommonMark for coloring or custom styling of text.

Drawings

There is no support in CommonMark for drawings.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close