diff --git a/docs/make.jl b/docs/make.jl index 402bc80..ffc36e5 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,6 +1,10 @@ -using Documenter +using Documenter: + HTML, + deploydocs, + makedocs -using Pluto, PlutoSliderServer +using PlutoStaticHTML +using Pkg: Pkg using Herb @@ -11,27 +15,20 @@ using HerbInterpret using HerbCore using HerbSpecification -# Create md file for tutorial that embeds html file -basedir = joinpath(@__DIR__, "src", "tutorials") -html_files = filter!(f -> occursin(r"\.html$", f), readdir(basedir)) # assumes all html file in directory are tutorials +tutorials_dir = joinpath(dirname(@__DIR__), "docs", "src", "tutorials") -for f in html_files - html_path = joinpath(basedir, f) - filename = replace(f, ".html" => "") - md_path = joinpath(basedir, "$filename.md") - content = """ - # Tutorial $filename - - - """ - open(md_path, "w") do file - write( - file, - content - ) - end +function build() + println("Building notebooks in $tutorials_dir") + use_distributed = false + output_format = documenter_output + bopts = BuildOptions(tutorials_dir; use_distributed, output_format) + build_notebooks(bopts) + Pkg.activate(@__DIR__) + return nothing end +build() + makedocs( modules=[HerbConstraints, HerbSearch, HerbGrammar, HerbSpecification, HerbInterpret, HerbCore], @@ -62,9 +59,9 @@ makedocs( "HerbSearch.jl" => "HerbSearch/index.md", ], ], - format=Documenter.HTML( + format=HTML( sidebar_sitename=false, - size_threshold=512000, + size_threshold=2^20, ), warnonly=[:missing_docs, :cross_references, :doctest] ) diff --git a/docs/src/tutorials/abstract_syntax_trees.html b/docs/src/tutorials/abstract_syntax_trees.html deleted file mode 100644 index f002fb3..0000000 --- a/docs/src/tutorials/abstract_syntax_trees.html +++ /dev/null @@ -1,18 +0,0 @@ -
- - - - - - - -