Skip to content

General redirects from old urls to new ones #1520

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

Closed
gcharang opened this issue Apr 4, 2019 · 2 comments
Closed

General redirects from old urls to new ones #1520

gcharang opened this issue Apr 4, 2019 · 2 comments

Comments

@gcharang
Copy link

gcharang commented Apr 4, 2019

Feature request

A way to redirect an older url to an existing url in the current site structure.
Example:
Old link: https://docs.examplesite.com/intro/basics.html to be redirected to
New Link: https://docs.examplesite.com/start-here/introduction.html

The absence of a straightforward way to do this has been discussed in Issue #160

What problem does this feature solve?

When reorganizing the directory structure as well as changing the names of files and directories, this feature is useful to not break the existing bookmarks and links from other websites.

The plugin vuepress-plugin-redirect exists but it is only useful for a subset of redirects where "redirecting any page to its subpages" is needed.

What does the proposed API look like?

I would suggest requiring a file like https://github.com/vuejs/vue-router/blob/dev/docs/.vuepress/public/_redirects which contains the old and new links side by side or as an array of JSONs. The plugin should read the file to generate the redirects.

How should this be implemented in your opinion?

I am not sure, but the redirects in the above-linked file are working in the vue-router's website: https://router.vuejs.org/
Ex: https://router.vuejs.org/en/essentials/getting-started.html
properly gets redirected to
https://router.vuejs.org/guide/

Are you willing to work on this yourself?

I am a newbie to JS and Vue, happily using vuepress to create documentation like: https://developers.komodoplatform.com/

But, @shigma suggested they were considering to support this feature in the plugin vuepress-plugin-redirect

@shigma
Copy link
Collaborator

shigma commented Apr 4, 2019

But, @shigma suggested they were considering to support this feature in the plugin vuepress-plugin-redirect

So you had better open an issue there instead of here.

Actually VuePress is not going to support such features cause they can be easily realized by a plugin......

@gcharang
Copy link
Author

gcharang commented Apr 4, 2019

Ah, sorry. Didn't realize the difference. Will open the feature request in its repo.

@gcharang gcharang closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants