Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try Runic formatting again #141

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ test/Manifest.toml
docs/Manifest.toml
/docs/build/
/.vscode
LocalPreferences.toml
LocalPreferences.toml
docs/src/applications/cell_simulation.mp4
11 changes: 6 additions & 5 deletions docs/liveserver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Pkg.instantiate()
import LiveServer
withenv("LIVESERVER_ACTIVE" => "true") do
LiveServer.servedocs(;
launch_browser=true,
foldername=joinpath(repo_root, "docs"),
include_dirs=[joinpath(repo_root, "src")],
skip_dirs=[joinpath(repo_root, "docs/src/tutorials"),
launch_browser = true,
foldername = joinpath(repo_root, "docs"),
include_dirs = [joinpath(repo_root, "src")],
skip_dirs = [
joinpath(repo_root, "docs/src/tutorials"),
joinpath(repo_root, "docs/src/applications"),
joinpath(repo_root, "docs/src/figures"),
],
)
end
end
86 changes: 46 additions & 40 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ using Literate
using Test
using Dates

DocMeta.setdocmeta!(DelaunayTriangulation, :DocTestSetup, :(using DelaunayTriangulation, Test);
recursive=true)
DocMeta.setdocmeta!(
DelaunayTriangulation, :DocTestSetup, :(using DelaunayTriangulation, Test);
recursive = true,
)

const IS_LIVESERVER = false && get(ENV, "LIVESERVER_ACTIVE", "false") == "true"
if IS_LIVESERVER
Expand Down Expand Up @@ -41,7 +43,7 @@ function add_just_the_code_section(dir, file)
file_name, file_ext = splitext(file)
file_path = joinpath(dir, file)
new_file_path = joinpath(session_tmp, file_name * "_just_the_code" * file_ext)
cp(file_path, new_file_path, force=true)
cp(file_path, new_file_path, force = true)
folder = splitpath(dir)[end] # literate_tutorials or literate_applications
open(new_file_path, "a") do io
write(io, "\n")
Expand Down Expand Up @@ -74,7 +76,7 @@ for folder in ("tutorials", "applications")
# end
#end
new_file_path = add_just_the_code_section(dir, file)
script = Literate.script(file_path, session_tmp, name=splitext(file)[1] * "_just_the_code_cleaned")
script = Literate.script(file_path, session_tmp, name = splitext(file)[1] * "_just_the_code_cleaned")
code = strip(read(script, String))
@info "[$(ct())] Processing $file: Converting markdown script"
line_ending_symbol = occursin(code, "\r\n") ? "\r\n" : "\n"
Expand All @@ -86,12 +88,12 @@ for folder in ("tutorials", "applications")
Literate.markdown(
new_file_path,
outputdir;
documenter=true,
postprocess=editurl_update ∘ post_strip,
credit=true,
name=splitext(file)[1],
execute=!IS_LIVESERVER,
flavor=Literate.DocumenterFlavor(),
documenter = true,
postprocess = editurl_update ∘ post_strip,
credit = true,
name = splitext(file)[1],
execute = !IS_LIVESERVER,
flavor = Literate.DocumenterFlavor(),
)
end
end
Expand Down Expand Up @@ -127,15 +129,15 @@ const _PAGES = [
"Voronoi Tessellations" => "tutorials/voronoi.md",
"Clipped Voronoi Tessellations" => [
"Clipping to the Convex Hull" => "tutorials/clipped.md",
"Clipping to a Rectangle" => "tutorials/clipped_rectangle.md"
"Clipping to a Rectangle" => "tutorials/clipped_rectangle.md",
],
"Centroidal Voronoi Tessellations" => "tutorials/centroidal.md",
"Point Location" => "tutorials/point_location.md",
"Nearest Neighbour Queries" => "tutorials/nearest.md",
"Convex Hulls" => "tutorials/convex_hull.md",
"Pole of Inaccessibility" => "tutorials/pole_of_inaccessibility.md",
"Point-in-Polygon Testing" => "tutorials/point_in_polygon.md",
"Using Custom Structs for Primitives and Boundaries" => "tutorials/custom_primitive.md"
"Using Custom Structs for Primitives and Boundaries" => "tutorials/custom_primitive.md",
],
"Manual" => [
"Overview" => "manual/overview.md",
Expand Down Expand Up @@ -168,7 +170,7 @@ const _PAGES = [
"Data Structures" => "extended/data_structures.md",
"Algorithm Internals" => "extended/algorithms.md",
"Utility Functions" => "extended/utils.md",
],
],
"Mathematical Details" => [
"Overview" => "math/overview.md",
"Delaunay Triangulations" => "math/delaunay.md",
Expand Down Expand Up @@ -221,34 +223,38 @@ end

# Make and deploy
makedocs(;
modules=[DelaunayTriangulation],
authors="Daniel VandenHeuvel <[email protected]>",
sitename="DelaunayTriangulation.jl",
format=Documenter.HTML(;
prettyurls=IS_CI,
canonical="https://JuliaGeometry.github.io/DelaunayTriangulation.jl",
edit_link="main",
size_threshold=8000 * 2^10,
size_threshold_warn=1000 * 2^10,
size_threshold_ignore=["api/triangulation.md", "extended/data_structures.md"],
collapselevel=1,
assets=String[],
mathengine=MathJax3(Dict(
:loader => Dict("load" => ["[tex]/physics"]),
:tex => Dict(
"inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
"tags" => "ams",
"packages" => ["base", "ams", "autoload", "physics"],
modules = [DelaunayTriangulation],
authors = "Daniel VandenHeuvel <[email protected]>",
sitename = "DelaunayTriangulation.jl",
format = Documenter.HTML(;
prettyurls = IS_CI,
canonical = "https://JuliaGeometry.github.io/DelaunayTriangulation.jl",
edit_link = "main",
size_threshold = 8000 * 2^10,
size_threshold_warn = 1000 * 2^10,
size_threshold_ignore = ["api/triangulation.md", "extended/data_structures.md"],
collapselevel = 1,
assets = String[],
mathengine = MathJax3(
Dict(
:loader => Dict("load" => ["[tex]/physics"]),
:tex => Dict(
"inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
"tags" => "ams",
"packages" => ["base", "ams", "autoload", "physics"],
),
),
))),
linkcheck=false,
warnonly=true,
draft=IS_LIVESERVER,
pages=_PAGES,
pagesonly=true,
),
),
linkcheck = false,
warnonly = true,
draft = IS_LIVESERVER,
pages = _PAGES,
pagesonly = true,
)

deploydocs(;
repo="github.com/JuliaGeometry/DelaunayTriangulation.jl",
devbranch="main",
push_preview=true)
repo = "github.com/JuliaGeometry/DelaunayTriangulation.jl",
devbranch = "main",
push_preview = true,
)
Loading
Loading