@@ -12,23 +12,47 @@ DocMeta.setdocmeta!(
12
12
LorentzVectorBase, :DocTestSetup , :(using LorentzVectorBase); recursive= true
13
13
)
14
14
15
+ # some paths for links
16
+ readme_path = joinpath (project_path, " README.md" )
17
+ index_path = joinpath (project_path, " docs/src/index.md" )
18
+ license_path = " https://github.com/QEDjl-project/QEDcore.jl/blob/main/LICENSE"
19
+
20
+ # Copy README.md from the project base folder and use it as the start page
21
+ open (readme_path, " r" ) do readme_in
22
+ readme_string = read (readme_in, String)
23
+
24
+ # replace relative links in the README.md
25
+ readme_string = replace (readme_string, " [MIT](LICENSE)" => " [MIT]($(license_path) )" )
26
+
27
+ open (index_path, " w" ) do readme_out
28
+ write (readme_out, readme_string)
29
+ end
30
+ end
31
+
15
32
pages = [
16
33
" Home" => " index.md" , " Interface" => " 10-interface.md" , " Reference" => " 95-reference.md"
17
34
]
18
35
19
- makedocs (;
20
- modules= [LorentzVectorBase],
21
- authors
= " Uwe Hernandez Acosta <[email protected] >" ,
22
- repo= Documenter. Remotes. GitHub (" JuliaHEP" , " LorentzVectorBase.jl" ),
23
- sitename= " LorentzVectorBase.jl" ,
24
- format= Documenter. HTML (;
25
- prettyurls= get (ENV , " CI" , " false" ) == " true" ,
26
- canonical= " https://JuliaHEP.github.io/LorentzVectorBase.jl" ,
27
- # repolink="https://github.com/JuliaHEP/LorentzVectorBase.jl",
28
- # edit_link="main",
29
- assets= String[],
30
- ),
31
- pages= pages,
32
- )
36
+ try
37
+ makedocs (;
38
+ modules= [LorentzVectorBase],
39
+ authors
= " Uwe Hernandez Acosta <[email protected] >" ,
40
+ repo= Documenter. Remotes. GitHub (" JuliaHEP" , " LorentzVectorBase.jl" ),
41
+ sitename= " LorentzVectorBase.jl" ,
42
+ format= Documenter. HTML (;
43
+ prettyurls= get (ENV , " CI" , " false" ) == " true" ,
44
+ canonical= " https://JuliaHEP.github.io/LorentzVectorBase.jl" ,
45
+ # repolink="https://github.com/JuliaHEP/LorentzVectorBase.jl",
46
+ # edit_link="main",
47
+ assets= String[],
48
+ ),
49
+ pages= pages,
50
+ )
51
+
52
+ finally
53
+ # doing some garbage collection
54
+ @info " GarbageCollection: remove generated landing page"
55
+ rm (index_path)
56
+ end
33
57
34
58
deploydocs (; repo= " github.com/JuliaHEP/LorentzVectorBase.jl" , push_preview= true )
0 commit comments