@@ -6,67 +6,26 @@ using Documenter
6
6
using Pluto, PlutoStaticHTML
7
7
using Documenter: MathJax3
8
8
9
- tutorial_menu = Array {Pair{String,String},1} ( )
9
+ pluto_src_folder = joinpath ( @__DIR__ , " src " , " tutorials " )
10
10
11
- #
12
- # Generate Pluto Tutorial HTMLs
11
+ """
12
+ build()
13
13
14
- # pluto_src_folder = joinpath(@__DIR__, "src", "tutorials")
15
- # pluto_output_folder = joinpath(@__DIR__, "src", "tutorials")
16
- # pluto_relative_path = "tutorials/"
17
- # mkpath(pluto_output_folder)
14
+ Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
15
+ """
16
+ function build ()
17
+ println (" Building notebooks" )
18
+ hopts = HTMLOptions (; append_build_context= false )
19
+ output_format = documenter_output
20
+ bopts = BuildOptions (pluto_src_folder; output_format)
21
+ build_notebooks (bopts, hopts)
22
+ return nothing
23
+ end
18
24
19
- # """
20
- # build()
21
- # Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
22
- # """
23
- # function build()
24
- # println("Building notebooks")
25
- # hopts = HTMLOptions(; append_build_context=true)
26
- # output_format = documenter_output
27
- # bopts = BuildOptions(pluto_src_folder; output_format)
28
- # build_notebooks(bopts, hopts)
29
- # return nothing
30
- # end
31
-
32
- # # Build the notebooks; defaults to true.
33
- # if get(ENV, "BUILD_DOCS_NOTEBOOKS", "true") == "true"
34
- # build()
35
- # end
36
-
37
- # # Please do not use the same name as for a(n old) literate Tutorial
38
- # pluto_files = [
39
- # "gnn_intro_pluto",
40
- # "graph_classification_pluto",
41
- # ]
42
- # pluto_titles = [
43
- # "Intro to Graph Neural Networks ",
44
- # "Graph Classification",
45
- # ]
46
-
47
- # # build menu and write files myself - tp set edit url correctly.
48
- # for (title, file) in zip(pluto_titles, pluto_files)
49
- # global tutorial_menu
50
- # rendered = build_notebooks( #though not really parallel here
51
- # BuildOptions(
52
- # pluto_src_folder;
53
- # output_format=documenter_output,
54
- # write_files=false,
55
- # use_distributed=false,
56
- # ),
57
- # ["$(file).jl"],
58
- # )
59
- # write(
60
- # joinpath(pluto_output_folder, file * ".md"),
61
- # """
62
- # ```@meta
63
- # EditURL = "$(joinpath(pluto_src_folder, file * ".jl"))"
64
- # ```
65
- # $(rendered[1])
66
- # """,
67
- # )
68
- # push!(tutorial_menu, title => joinpath(pluto_relative_path, file * ".md"))
69
- # end
25
+ # Build the notebooks; defaults to true.
26
+ if get (ENV , " BUILD_DOCS_NOTEBOOKS" , " true" ) == " true"
27
+ build ()
28
+ end
70
29
71
30
DocMeta. setdocmeta! (GraphNeuralNetworks, :DocTestSetup ,
72
31
:(using GraphNeuralNetworks, Graphs, SparseArrays, NNlib, Flux);
@@ -86,12 +45,11 @@ makedocs(;
86
45
" Message Passing" => " messagepassing.md" ,
87
46
" Model Building" => " models.md" ,
88
47
" Datasets" => " datasets.md" ,
89
- # "Tutorials" => tutorial_menu,
90
- # "Tutorials" =>
91
- # [
92
- # "Intro to Graph Neural Networks" => "gnn_intro_pluto.md",
93
- # "Graph Classification" => "graph_classification_pluto.md",
94
- # ],
48
+ " Tutorials" =>
49
+ [
50
+ " Intro to Graph Neural Networks" => " tutorials/gnn_intro_pluto.md" ,
51
+ " Graph Classification" => " tutorials/graph_classification_pluto.md" ,
52
+ ],
95
53
" API Reference" =>
96
54
[
97
55
" GNNGraph" => " api/gnngraph.md" ,
0 commit comments