|
1 | 1 | using Flux, NNlib, GraphNeuralNetworks, Graphs, SparseArrays
|
2 | 2 | using Documenter
|
3 | 3 |
|
| 4 | +# See this for a template of Pluto+Documenter |
| 5 | +# https://github.com/rikhuijzer/PlutoStaticHTML.jl/blob/main/docs/make.jl |
| 6 | +using Pluto, PlutoStaticHTML |
| 7 | +using Documenter: MathJax3 |
| 8 | + |
| 9 | +tutorial_menu = Array{Pair{String,String},1}() |
| 10 | + |
| 11 | +# |
| 12 | +# Generate Pluto Tutorial HTMLs |
| 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) |
| 18 | + |
| 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 |
| 70 | + |
4 | 71 | DocMeta.setdocmeta!(GraphNeuralNetworks, :DocTestSetup,
|
5 | 72 | :(using GraphNeuralNetworks, Graphs, SparseArrays, NNlib, Flux);
|
6 | 73 | recursive=true)
|
7 | 74 |
|
| 75 | +prettyurls = get(ENV, "CI", nothing) == "true" |
| 76 | +mathengine = MathJax3() |
| 77 | + |
8 | 78 | makedocs(;
|
9 |
| - modules=[GraphNeuralNetworks, NNlib, Flux, Graphs, SparseArrays], |
10 |
| - doctest=false, clean=true, |
| 79 | + modules = [GraphNeuralNetworks, NNlib, Flux, Graphs, SparseArrays], |
| 80 | + doctest = false, |
| 81 | + clean = true, |
| 82 | + format= Documenter.HTML(; mathengine, prettyurls), |
11 | 83 | sitename = "GraphNeuralNetworks.jl",
|
12 | 84 | pages = ["Home" => "index.md",
|
13 | 85 | "Graphs" => "gnngraph.md",
|
14 | 86 | "Message Passing" => "messagepassing.md",
|
15 | 87 | "Model Building" => "models.md",
|
16 | 88 | "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 | + # ], |
17 | 95 | "API Reference" =>
|
18 | 96 | [
|
19 | 97 | "GNNGraph" => "api/gnngraph.md",
|
|
0 commit comments