-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make /welcome.html
redirect to /
#847
Comments
Can I work on this issue? |
Sure, go right ahead! 😄 |
Could I work on this or is already taken by someone else? 😄 |
Hey @lorinaX, you could discuss with @CYBWEBALI on how to solve this. I don't know what the plan is here, but I would be curious to hear 😄 We also have another issue related to linking pages: google/mdbook-i18n-helpers#35. That would also require changing |
Hi @CYBWEBALI and @lorinaX, please let me know if you have an idea for how to solve this 😄 It would be good to discuss it before either of you invest a lot of time into it. |
well since the other guy didn't grab this issue, I'll go ahead and work on it right now I have a few ideas on how I can do this, I will make sure to update you after I have finished a few ideas, shouldn't take me too long! |
This comment was marked as off-topic.
This comment was marked as off-topic.
Can you give me some exact steps for me to replicate this, I did some changes and I think it should be fine now. |
This comment was marked as off-topic.
This comment was marked as off-topic.
When we go to (comprehensive-rust/index.html). This should correspond to the canonical URL https://google.github.io/comprehensive-rust/ and when we navigate through the book and we navigate back to the start page the url should be https://google.github.io/comprehensive-rust/ and not https://google.github.io/comprehensive-rust/welcome.html. This is to my understanding and I want to make sure I don't miss any edge case or have misunderstood the problem in any way before making a PR that is why I asked for the exact steps to replicate the problem, to fix this issue was pretty simple you just need to add the following to book.toml: and to make sure we have a conical-url in the [output.excerciser] (Update) unless you can run a small server I don't think there would be way to redirect this since you are hosting on github pages, my local version works with tokio and warp. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think when you set [output.html.redirects] After putting this in As per docs of mdbook there is no such options, |
Hi @Tnation888, it's great if you want to help out, but I don't understand your comment here? |
Yeah, good point! Right now there are 3 valid URLs for the same page:
Perhaps we could start by renaming |
I can try this. |
When building the book, mdBook will always generate an `index.html` page for first page of the book. This meant that we had the same content available under two different names: - `welcome.html`: this is what the TOC would link to, and - `index.html` or simply `/`: this is what search engines link to Renaming the page and setting up a redirect should fix this confusion. We still don’t have a good way of avoiding links to the `index.html` page, but this should fix the first half of the problem. I tested this for translations as well by building the output in a subdirectory and serving the parent directory. Part of #847.
When building the book, mdBook will always generate an `index.html` page for first page of the book. This meant that we had the same content available under two different names: - `welcome.html`: this is what the TOC would link to, and - `index.html` or simply `/`: this is what search engines link to Renaming the page and setting up a redirect should fix this confusion. We still don’t have a good way of avoiding links to the `index.html` page, but this should fix the first half of the problem. I tested this for translations as well by building the output in a subdirectory and serving the parent directory. Part of #847.
I renamed |
This upstream issue would take care of removing the |
When building the book, mdBook will always generate an `index.html` page for first page of the book. This meant that we had the same content available under two different names: - `welcome.html`: this is what the TOC would link to, and - `index.html` or simply `/`: this is what search engines link to Renaming the page and setting up a redirect should fix this confusion. We still don’t have a good way of avoiding links to the `index.html` page, but this should fix the first half of the problem. I tested this for translations as well by building the output in a subdirectory and serving the parent directory. Part of google#847.
We currently have both
https://google.github.io/comprehensive-rust/
(there must be anindex.html
page here)https://google.github.io/comprehensive-rust/welcome.html
online. The latter is mostly seen when you navigate forward and then back to the start page.
We should only have one page and we should make
https://google.github.io/comprehensive-rust/
the canonical page.Fixing this might involve working on
mdbook
to have it generate links back to the/
page instead of to/index.html
.Make sure this works for the translations as well.
The text was updated successfully, but these errors were encountered: