Skip to content

Commit

Permalink
Add tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed May 30, 2024
1 parent b36ee33 commit 566bf8c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.3"
manifest_format = "2.0"
project_hash = "549a944f3e0b1062b2c4a8fabcca43ca4022be0d"
project_hash = "a503b4f951cf10fc76e1520a620cb8fdc7c63464"

[[deps.ADTypes]]
git-tree-sha1 = "daf26bbdec60d9ca1c0003b70f389d821ddb4224"
Expand Down Expand Up @@ -1102,6 +1102,12 @@ version = "2.8.0"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b"

[[deps.Literate]]
deps = ["Base64", "IOCapture", "JSON", "REPL"]
git-tree-sha1 = "596df2daea9c27da81eee63ef2cf101baf10c24c"
uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
version = "2.18.0"

[[deps.LogExpFunctions]]
deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37"
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Expand Down
18 changes: 18 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
using Documenter, DocumenterCitations
using ClimaTimeSteppers
using Literate

tutorial_basedir = "tutorials"
tutorial_basedir_from_here = joinpath(@__DIR__, "src", tutorial_basedir)

jl_files_in_basedir = filter(endswith(".jl"), readdir(tutorial_basedir_from_here))

println("Building literate tutorials...")
generated_tutorials = String[]
for filename in jl_files_in_basedir
Literate.markdown(
joinpath(tutorial_basedir_from_here, filename),
tutorial_basedir_from_here;
flavor = Literate.CommonMarkFlavor(),
)
push!(generated_tutorials, joinpath(tutorial_basedir, replace(filename, ".jl" => ".md")))
end

# https://github.com/jheinen/GR.jl/issues/278#issuecomment-587090846
ENV["GKSwstype"] = "nul"
Expand All @@ -19,6 +36,7 @@ pages = [
"Test problems" => [
"test_problems/index.md",
],
"Tutorials" => generated_tutorials,
"API docs" => [
"ODE Solvers" => "api/ode_solvers.md",
"Newtons Method" => "api/newtons_method.md",
Expand Down

0 comments on commit 566bf8c

Please sign in to comment.