claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 185 forks source link

Page redirection #252

Open FranklinYu opened 5 years ago

FranklinYu commented 5 years ago

This is a feature request.

When we rename a page, previous link to the old URL would be dead. It would be great if we can edit the old page with things like this:

#REDIRECT [[new page]]

And it automatically redirects visitors to the new page.

claudioc commented 5 years ago

Yes, that would be a great addition, but Jingo doesn't have a database so it's hard to image the correct place to save those redirects... maybe embedding the information directly in the page itself? I don't know. I will leave it open for Jingo 2 :)

FranklinYu commented 5 years ago

I would suggest to save it as normal file. When Jingo render it, if the file contains the magic words, return a redirection instead of “200 OK” rendering the words.