-
Notifications
You must be signed in to change notification settings - Fork 336
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
Allow to specify redirects in _pkgdown.yml #1259
Comments
Yeah, I like it — we'd have to do html style redirects, but that would be better than nothing. |
You can make a custom pkgdown has a generic one: https://pkgdown.r-lib.org/dev/outdated-vignette-name.html |
According to StackOverflow, "Use of meta refresh is discouraged by the World Wide Web Consortium", which seems to be used by the html style redirects, so I think it's better to look for another solution? |
There is no other solution; an html style redirect is the best we can hope for in pkgdown, given that the most common form of deployment is github pages which doesn't support redirects at the http level. |
Another option would be for pkgdown to create a page that mirrors the content of the new vignette URL but on the old URL, possibly with a deprecation warning:
But this would possibly add a lot of complexity to an already complex package. |
Assuming I have a vignette that I rename, the pkgdown link to this vignette will change and all people who follow the old link will see a 404 error. The same with help files for renamed functions etc. It would be nice if {pkgdown} could provide a way to specify redirects manually, relative to the base url, e.g. in
_pkgdown.yml
:Looks like this is valid yml. The key should be the new name, because it's potentially a one-to-many mapping. What do you think of such a feature?
The text was updated successfully, but these errors were encountered: