1
1
using QuanEstimation
2
2
using Documenter
3
3
using DocumenterMarkdown
4
+ import Documenter. Writers. MarkdownWriter: render, renderdoc
4
5
5
6
DocMeta. setdocmeta! (
6
7
QuanEstimation,
@@ -9,6 +10,24 @@ DocMeta.setdocmeta!(
9
10
recursive = true ,
10
11
)
11
12
13
+ # function render(io::IO, mime::MIME"text/plain", anchor::Documenter.Anchors.Anchor, page, doc)
14
+ # println(io, "\n", lstrip(Documenter.Anchors.fragment(anchor), '#', " "))
15
+ # if anchor.nth == 1 # add legacy id
16
+ # legacy = lstrip(Documenter.Anchors.fragment(anchor), '#', " ") * "-1"
17
+ # println(io, "\n", legacy)
18
+ # end
19
+ # render(io, mime, anchor.object, page, doc)
20
+ # end
21
+
22
+ function render (io:: IO , mime:: MIME"text/plain" , node:: Documenter.Documents.DocsNode , page, doc)
23
+ # Docstring header based on the name of the binding and it's category.
24
+ anchor = " ## "
25
+ header = " **`$(node. object. binding) `** — *$(Documenter. Utilities. doccat (node. object)) *."
26
+ println (io, anchor, " " , header, " \n\n " )
27
+ # Body. May contain several concatenated docstrings.
28
+ renderdoc (io, mime, node. docstr, page, doc)
29
+ end
30
+
12
31
makedocs (;
13
32
format = Markdown (),
14
33
root = " ." ,
0 commit comments