Add generate_redirects
function to generate HTML redirects of Documenter sites
#76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The use case I imagine here is where you want to move the docs from one domain to another (e.g. when you move the package from one GitHub org to another), but you want to keep the old URLs working(-ish).
The normal process is to just move the
gh-pages
to the new repo. With this function, you can replace the old site with redirects to the new site.E.g. let's say you want to move from a
github.com/personalusername/MyPackage.jl
(docs hosted athttps://personalusername.github.io/MyPackage.jl/
) togithub.com/CentralizedJuliaOrg/MyPackage.jl
(with docs hosted athttps://centralizedjulia.org/MyPackage.jl
.To do that, you can check out the
gh-pages
branch locally and run:The contents of
out
should be pushed to the old repository (i.e. personalusername), and thenhttps://personalusername.github.io/MyPackage.jl/...
should redirect to the new domain.Currently builds on top of #75. Needs tests and docs.