@@ -3,8 +3,14 @@ using Pluto
33
44include (" definitions.jl" )
55
6+ repo_dir = dirname (@__DIR__ )
7+ build_dir = joinpath (repo_dir, " docs" , " build" )
8+
9+ plutos = [
10+ joinpath (repo_dir, " class01" , " background_materials" , " basics_math.jl" ),
11+ ]
12+
613makedocs (
7- modules= [LearningToControlClass],
814 sitename = " LearningToControlClass" ,
915 format = Documenter. HTML (;
1016 assets = [" assets/wider.css" , " assets/redlinks.css" ],
@@ -16,11 +22,24 @@ makedocs(
1622 ),
1723 )),
1824 ),
19- pages = [
20- " Home" => " index.md" ,
25+ pages = [
26+ " Home" => " index.md" ,
27+ " Class 1" => " class01.md" ,
2128 ],
2229)
2330
31+ s = Pluto. ServerSession ();
32+ for pluto in plutos
33+ nb = Pluto. SessionActions. open (s, pluto; run_async= false )
34+ html_contents = Pluto. generate_html (nb; binder_url_js= " undefined" )
35+ filename = replace (pluto, repo_dir => build_dir)
36+ html_path = replace (filename, r" \. jl$" => " .html" )
37+ mkpath (dirname (html_path))
38+ open (html_path, " w" ) do f
39+ write (f, html_contents)
40+ end
41+ end
42+
2443# Documenter can also automatically deploy documentation to gh-pages.
2544# See "Hosting Documentation" and deploydocs() in the Documenter manual
2645# for more information.
0 commit comments