-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmake.jl
59 lines (53 loc) · 1.47 KB
/
make.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
using Documenter
using Interfaces
using BaseInterfaces
using Literate
DocMeta.setdocmeta!(Interfaces, :DocTestSetup, :(using Interfaces); recursive=true)
# Copy README
base_url = "https://github.com/rafaqz/Interfaces.jl/blob/main/"
index_path = joinpath(@__DIR__, "src", "index.md")
readme_path = joinpath(dirname(@__DIR__), "README.md")
open(index_path, "w") do io
println(
io,
"""
```@meta
EditURL = "$(base_url)README.md"
```
""",
)
for line in eachline(readme_path)
println(io, line)
end
end
# Copy test files
Literate.markdown(
joinpath(dirname(@__DIR__), "test", "basic.jl"),
joinpath(@__DIR__, "src")
)
Literate.markdown(
joinpath(dirname(@__DIR__), "test", "advanced.jl"),
joinpath(@__DIR__, "src")
)
makedocs(;
modules=[Interfaces, BaseInterfaces],
authors="Rafael Schouten <[email protected]>",
sitename="Interfaces.jl",
format=Documenter.HTML(;
repolink="https://github.com/rafaqz/Interfaces.jl",
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://rafaqz.github.io/Interfaces.jl",
edit_link="main",
),
pages=[
"Home" => "index.md",
"Examples" => ["Basic" => "basic.md", "Advanced" => "advanced.md"],
"API reference" => "api.md",
"BaseInterfaces.jl reference" => "baseinterfaces.md",
],
)
deploydocs(;
repo="github.com/rafaqz/Interfaces.jl",
devbranch="main",
push_preview=true
)