Skip to content

Commit bf0e385

Browse files
authored
Update index.md
1 parent cd808bc commit bf0e385

File tree

1 file changed

+29
-34
lines changed

1 file changed

+29
-34
lines changed

docs/src/index.md

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,64 +15,59 @@ with $x_0$, $t_0$, $x_f$ and $t_f$ fixed. This problem is simple, and can be ana
1515

1616
## Reproducibility
1717

18+
```@setup main
19+
using Pkg
20+
using InteractiveUtils
21+
using Markdown
22+
23+
# Download links for the benchmark environment
24+
function _downloads_toml(DIR)
25+
link_manifest = joinpath("assets", DIR, "Manifest.toml")
26+
link_project = joinpath("assets", DIR, "Project.toml")
27+
return Markdown.parse("""
28+
You can download the exact environment used to build this documentation:
29+
- 📦 [Project.toml]($link_project) - Package dependencies
30+
- 📋 [Manifest.toml]($link_manifest) - Complete dependency tree with versions
31+
""")
32+
end
33+
```
34+
35+
```@example main
36+
_downloads_toml(".") # hide
37+
```
38+
1839
```@raw html
19-
<details><summary>The documentation of this package was built using these direct dependencies,</summary>
40+
<details style="margin-bottom: 0.5em; margin-top: 1em;"><summary>ℹ️ Version info</summary>
2041
```
2142

22-
```@example
23-
using Pkg # hide
24-
Pkg.status() # hide
43+
```@example main
44+
versioninfo() # hide
2545
```
2646

2747
```@raw html
2848
</details>
2949
```
3050

3151
```@raw html
32-
<details><summary>and using this machine and Julia version.</summary>
52+
<details style="margin-bottom: 0.5em;"><summary>📦 Package status</summary>
3353
```
3454

35-
```@example
36-
using InteractiveUtils # hide
37-
versioninfo() # hide
55+
```@example main
56+
Pkg.status() # hide
3857
```
3958

4059
```@raw html
4160
</details>
4261
```
4362

4463
```@raw html
45-
<details><summary>A more complete overview of all dependencies and their versions is also provided.</summary>
64+
<details style="margin-bottom: 0.5em;"><summary>📚 Complete manifest</summary>
4665
```
4766

48-
```@example
49-
using Pkg # hide
67+
```@example main
5068
Pkg.status(; mode = PKGMODE_MANIFEST) # hide
5169
```
5270

5371
```@raw html
5472
</details>
5573
```
56-
57-
```@eval
58-
using TOML
59-
using Markdown
60-
version = TOML.parse(read("../../Project.toml", String))["version"]
61-
name = TOML.parse(read("../../Project.toml", String))["name"]
62-
link_manifest = "https://github.com/control-toolbox/" *
63-
name *
64-
".jl/tree/gh-pages/v" *
65-
version *
66-
"/assets/Manifest.toml"
67-
link_project = "https://github.com/control-toolbox/" *
68-
name *
69-
".jl/tree/gh-pages/v" *
70-
version *
71-
"/assets/Project.toml"
72-
Markdown.parse("""You can also download the
73-
[manifest]($link_manifest)
74-
file and the
75-
[project]($link_project)
76-
file.
77-
""")
78-
```

0 commit comments

Comments
 (0)