MarkdownAST.jl

Morten Piibeleht

@mortenpi

Lightweight interface package for (Markdown) documents

Documenter

Markdown docstrings

Markdown
standard library

Markdown pages (.md)

Generated docs
(e.g. Literate.jl)

Markdown pages
(.md, but GFM)

CommonMark.jl

Writer modules

(HTML, PDF, EPUB)

Documenter

MarkdownAST

Documenter

# Writing Documentation

Julia enables package developers and users
to document functions, types and other objects
easily via a built-in documentation system.

Documentation is interpreted as
[Markdown](https://en.wikipedia.org/wiki/Markdown),
so you can use indentation and code fences to
delimit code examples from text.

> Markdown support is implemented in the Markdown
> standard library and for a full list of
> supported syntax see the documentation.
  • Document
    • Heading
      • Text
    • Paragraph
      • Text
    • Paragraph
      • Text
      • Link
        • Text
      • Text
    • Blockquote
      • Paragraph
        • Text

Nodes

Elements

Give semanting meaning to a node. E.g.

  • Paragraph
  • Heading
  • Code block
  • Link
  • Text
  • ...
mutable struct Node
    element :: AbstractElement
    ...
end
mutable struct CodeBlock <: AbstractBlock
    info :: String
    code :: String
end

mutable struct Link <: AbstractInline
    destination :: String
    title :: String
end

AbstractTrees.jl

included!

Methods to add, append, copy, unlink etc.

Extensibility = custom elements

```@example
using MyPackages
my_params = (1,2,3)
run_my_simulation(my_params)
```
struct ExampleBlock <: AbstractBlock
    code :: String
    result_object :: Any
    captured_output :: Any
end
mutable struct CodeBlock <: AbstractBlock
    info :: String = "@example"
    code :: String = """
    using MyPackages
    my_params = (1,2,3)
    run_my_simulation(my_params)
    """
end

github.com/JuliaDocs/MarkdownAST.jl

MarkdownAST

By Morten Piibeleht