Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fverdugo committed Aug 14, 2023
1 parent fbb7423 commit 5d0c156
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function convert_embedded_img_to_base64(notebook_path)
doc = replace(doc, "attachment:$filename.png" => "data:image/png;base64,$base64")
end
filename = splitpath(notebook_path)[end]
write("docs/src/notebooks/$filename", doc);
open("docs/src/notebooks/$filename","w") do f
write(f, doc)
end
end

# Write markdown file that includes notebook html
Expand Down Expand Up @@ -93,7 +95,9 @@ end


# Loop over notebooks and generate html and markdown
notebook_files = glob("*.ipynb", "notebooks/")
repo_root = joinpath(@__DIR__,"..") |> normpath
mkpath(joinpath(repo_root,"docs","src","notebooks"))
notebook_files = glob("*.ipynb", joinpath(repo_root,"notebooks/"))
for filepath in notebook_files
convert_embedded_img_to_base64(filepath)
filename_with_ext = splitpath(filepath)[end]
Expand All @@ -119,7 +123,7 @@ makedocs(;
"Remote calls and remote channels" => "notebooks/julia_distributed.md",
"Matrix Multiplication"=>"notebooks/matrix_matrix.md",
"Jacobi" => "notebooks/jacobi_method.md",
"Solutions" => "notebooks/sol_matrix_matrix.md"
"Solutions" => "notebooks/solutions.md"
]],
)

Expand Down

0 comments on commit 5d0c156

Please sign in to comment.