Skip to content

Commit

Permalink
Move notebook building function to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenJ committed Nov 14, 2024
1 parent dccf693 commit 4a26a8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
9 changes: 9 additions & 0 deletions docs/build_notebooks.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using PlutoStaticHTML

function build(tutorials_dir)
@info "Building notebooks in $tutorials_dir"
use_distributed = false
output_format = documenter_output
bopts = BuildOptions(tutorials_dir; use_distributed, output_format)
build_notebooks(bopts)
end
30 changes: 7 additions & 23 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
using Documenter:
HTML,
deploydocs,
makedocs

using PlutoStaticHTML
using Pkg: Pkg

using Documenter: HTML, deploydocs, makedocs
using Herb

using HerbConstraints
using HerbSearch
using HerbCore
using HerbGrammar
using HerbInterpret
using HerbCore
using HerbSearch
using HerbSpecification
using Pkg
using PlutoStaticHTML

tutorials_dir = joinpath(dirname(@__DIR__), "docs", "src", "tutorials")

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()

Pkg.activate(@__DIR__)
build(tutorials_dir)

makedocs(
modules=[HerbConstraints, HerbSearch, HerbGrammar, HerbSpecification, HerbInterpret, HerbCore],
Expand Down

0 comments on commit 4a26a8b

Please sign in to comment.