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
RFE: Support for redirections #506
Comments
The page could be
|
Interesting and very useful idea. |
I like the idea. Seeing the Jekyll link... could we achieve this by defining the |
Hey, I would also be interested in this. Will use a redirect template until then. |
+1 for me as well. Redirections can, of course, be set up on the web server, but I do think that redirections is a useful feature for a static site generator. I primarily author my documents in Asciidoc. I always think to myself, would I be able to take my document as-is, and use it for something else (e.g. generating an epub)? While I don't necessarily mind declaring extra attributes in my adocs, perhaps the individual documents is not the appropriate place for redirections to reside (which is how Jekyll does it). The structure of the website should not be determined by the individual post. A redirect file (as suggested by OP, and which is more in line with how to set up redirections on a web server or CMS) is perhaps more appropriate. Please keep in mind, though, that redirections need to be versatile. It's not necessarily sufficient to "lift-and-shift" the existing directory structure into a new directory. For example, it would be good to be able to support a redirection such as
|
Also useful would be if we could create the |
Sometimes, the content structure has to be changed.
In such case, the old URLs should still work.
This is quite a challenge with a static website.
User could keep the old file with a link to the new location.
He could add a metadata to the header and render a redirect
<meta>
element in the template.However, it would be very nice if JBake could handle this and relieve the user from the burden:
Let's say we're moving pages from
content/beer
tocontent/drinking/beer
(because we also started drinking wine and rums :) ).content/beer/jbake.redirect
would contain:JBake would generate pages with
<meta>
redirects:With the redirects going to
${newLocation}${oldPath}
This is an idea I have now after reorganizing my site while it's still new. However, doing that to an existing site can sink it down in search engines for quite a long time, break potential dead links around the web etc.
So it's quite an important role of the static site generator.
Sounds good?
Edit: Looks like Jekyll has something similar, although doesn't seem like it relieves much work.
The text was updated successfully, but these errors were encountered: