CurrentModule = Norg
Documentation for Norg.jl.
Norg.jl is a library to work with the norg file format used in neorg. It currently implements the Layer 2 compatibility.
For a show-case of how the parser performs, please visit the norg specification rendering page. Note that the specification is not layer-2-friendly, so some parts just do not make sense for now.
Pages = ["index.md"]
There are currently two available code generation targets for Norg.jl: HTML and Pandoc JSON. Given a string to barse s, you can use:
norg(HTMLTarget(), s)or
norg(JSONTarget(), s)The sources for the Norg specification are available in an artifact of this package. Thus, you can generate an HTML version of the specification using:
using Norg
s = open(Norg.NORG_SPEC_PATH, "r") do f
read(f, String)
end;
open("1.0-specification.html", "w") do f
write(f, string(norg(HTMLTarget(), s)))
endSince Pandoc JSON is also available, you can export to Pandoc JSON and feed it to pandoc:
import JSON
open("1.0-specification.json", "w") do f
JSON.print(f, norg(JSONTarget(), s), 2)
end;You can then invoke Pandoc as follow:
pandoc -f json -t markdown 1.0-specification.json -o 1.0-specification.mdYou can also generate an Abstract Syntax Tree (AST) that implements AbstractTrees.jl interface using norg. See also the AST module.
norg(s)Modules = [Norg]
The inner API is documented in the Norg internals page.