Skip to content

Commit ae4b6fa

Browse files
committed
Badges in the tutorials pages now link to the documentation of the package (links may break if doc doesn't exist)
1 parent 4104793 commit ae4b6fa

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "0.1.0"
55
Bibliography = "f1be7e48-bf82-45af-a471-ae754a193061"
66
Franklin = "713c75ef-9fc9-4b05-94a9-213340da978e"
77
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
8+
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
89
NodeJS = "2bd173c7-0d6d-553b-b6af-13a54713934c"
910

1011
[compat]

sandbox.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
using LinearOperators, LinearAlgebra, Franklin

sandbox.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ Generates
3535
<span class="icon has-text-info">
3636
<ion-icon name="copy"></ion-icon>
3737
</span>
38-
~~~
38+
~~~
39+
40+
## Test list_versions
41+
42+
Check sandbox.jl (it is not actually being loaded).
43+
44+
{{ list_versions }}

utils.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ function badge(name, version)
6262
"666", "999"
6363
end
6464

65-
"<img class=\"badge\" src=\"https://img.shields.io/badge/$name-$version-$color?style=flat-square&labelColor=$lbl_color\">"
65+
badge_img = "<img class=\"badge\" src=\"https://img.shields.io/badge/$name-$version-$color?style=flat-square&labelColor=$lbl_color\">"
66+
if name in jso_pkgs
67+
link = "https://juliasmoothoptimizers.github.io/$name.jl/stable/"
68+
"<a href=\"$link\">$badge_img</a>"
69+
else
70+
badge_img
71+
end
6672
end
6773

6874
function hfun_list_versions()

0 commit comments

Comments
 (0)