/
DocumenterShowcase.jl
76 lines (57 loc) · 1.41 KB
/
DocumenterShowcase.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
"""
This is the [`DocumenterShowcase`](@ref), which contains
* [`DocumenterShowcase.foo`](@ref)
* [`DocumenterShowcase.bar`](@ref)
!!! compat "Documenter 0.24"
This showcase page is included in Documenter version 0.24.0 and above.
# Contents
Docstrings can contain admonitions and other block-level nodes.
!!! info
This admonition is in a docstring. It itself can contain block levels nodes such
as code blocks:
```julia
println("Hello World")
```
... or block quotes:
> Lorem ipsum.
In fact, while not recommended, you can actually have a matryoshka of admonitions:
!!! danger
!!! warning
!!! tip
!!! note
Stack overflow.
"""
module DocumenterShowcase
"""
Docstring for `foo(::Integer)`.
"""
foo(::Integer) = nothing
"""
Docstring for `foo(::AbstractString)`.
"""
foo(::AbstractString) = nothing
"""
Docstring for `bar(::Integer)`.
"""
bar(::Integer) = nothing
"""
Docstring for `bar(::AbstractString)`.
"""
bar(::AbstractString) = nothing
function hello(who)
println("Hello, $(who)!")
end
struct SVGCircle
stroke :: String
fill :: String
end
function Base.show(io, ::MIME"image/svg+xml", c::SVGCircle)
write(io, """
<svg width="50" height="50">
<g style="stroke-width: 3">
<circle cx="25" cy="25" r="24" stroke-width="2" style="stroke: #$(c.stroke); fill: #$(c.fill)" />
</g>
</svg>
""")
end
end # module