diff --git a/docs/buildutils/redirect_generation.jl b/docs/buildutils/redirect_generation.jl index 3fefd8aee96..75b6bc5e4cd 100644 --- a/docs/buildutils/redirect_generation.jl +++ b/docs/buildutils/redirect_generation.jl @@ -1,5 +1,5 @@ function generate_redirects(rules; dry_run = true) - htmlpaths = cd(joinpath("build", "final_site")) do + htmlpaths = cd("build") do collect(Iterators.flatmap(walkdir(".")) do (root, dirs, files) (chop(joinpath(root, file), head = 1, tail = 0) for file in files if endswith(file, ".html")) end) @@ -34,7 +34,7 @@ function write_redirection_html(redirect_file, existing_file; dry_run) @info "Adding redirect from $redirect_file to $existing_file" if !dry_run - cd(joinpath("build", "final_site")) do + cd("build") do filepath = "." * redirect_file mkpath(splitdir(filepath)[1]) open(filepath, "w") do io diff --git a/docs/makedocs.jl b/docs/makedocs.jl index ec98e7d0366..83d1a049f78 100644 --- a/docs/makedocs.jl +++ b/docs/makedocs.jl @@ -178,12 +178,7 @@ Documenter.makedocs(; pagesonly = true, ) -@show pwd() -run(`ls`) -println() -run(`ls ..`) -println() -cd(@__DIR__) +# DocumenterVitepress moves rendered files from `build/final_site` into `build` on CI by default, but not when running locally generate_redirects([ r"/reference/blocks/(.*).html" => s"/examples/blocks/\1/index.html", @@ -200,4 +195,4 @@ devurl = "dev" params = deployparameters(; repo, devbranch, devurl, push_preview) -deploy(params; target = "../build/final_site") +deploy(params; target = "build")