JuliaGraphics / Luxor.jl

Simple drawings using vector graphics; Cairo "for tourists!"
http://juliagraphics.github.io/Luxor.jl/
Other
575 stars 72 forks source link

Update redirects in `gh-pages` branch #296

Closed hyrodium closed 4 months ago

hyrodium commented 4 months ago

Someone may bookmark old manual links such as https://juliagraphics.github.io/Luxor.jl/v2.1.

image

I can access the page somehow, but the symlink v2.1 does not exist in the gh-pages brach. I think this is just cached, and the page will be removed in the future.

This PR adds redirect links to the LuxorManual page. Please access https://hyrodium.github.io/Luxor.jl/v2.1 for example. It redirects to https://juliagraphics.github.io/LuxorManual/v2.1.0.

hyrodium commented 4 months ago

I have updated the link with the following updatelink.jl file.

using Glob

paths = String[]
append!(paths, Glob.glob("v*.*.*/index.html"))
append!(paths, Glob.glob("v*.*.*/*/index.html"))
append!(paths, Glob.glob("v*.*.*/*/*/index.html"))
append!(paths, Glob.glob("dev/index.html"))
append!(paths, Glob.glob("dev/*/index.html"))
append!(paths, Glob.glob("dev/*/*/index.html"))
paths

for path in paths
    script = """
    <meta http-equiv="refresh" content="0; url=https://juliagraphics.github.io/LuxorManual/$(dirname(path))"/>
    """
    write(path, script)
end
cormullion commented 4 months ago

Thanks. The move to separate repository for documentation was difficult... 😀