Skip to content
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

Top documentation result in Google 404s #4335

Closed
Johngeorgesample opened this issue Apr 18, 2022 · 8 comments
Closed

Top documentation result in Google 404s #4335

Johngeorgesample opened this issue Apr 18, 2022 · 8 comments

Comments

@Johngeorgesample
Copy link

What docs page needs to be fixed?

What is the problem?

The top Google result for redux style guide looks to be an old route that 404s: https://redux.js.org/style-guide/style-guide
CleanShot 2022-04-18 at 10 26 41

What should be changed to fix the problem?

A redirect should be implemented to take users from this broken link to the actual style guide section.

@Johngeorgesample Johngeorgesample changed the title Top Google result 404s Top documentation result in Google 404s Apr 18, 2022
@timdorr
Copy link
Member

timdorr commented Apr 18, 2022

@markerikson Is this caused by the Docusaurus upgrade? This might affect other pages.

@markerikson
Copy link
Contributor

Very likely related, yes. I upgraded DS and it suddenly started reporting a CI of broken links, which were the style guide and other pages linked in the header and footer. Part of it seemed to be changed handling of files named README. I thought I fixed them, but wouldn't be surprised if there's other problems.

@slorber : any idea what would have caused these links to break with a DS upgrade?

@markerikson
Copy link
Contributor

It looks like the Style Guide page may now be pointing to https://redux.js.org/style-guide/ , instead of redux.js.org/style-guide/style-guide .

That's... weird. Why would this have suddenly changed?

@Josh-Cena
Copy link

Josh-Cena commented Apr 20, 2022

I've replied on Discord. For reference, it's because of facebook/docusaurus#5830 which means /<name>/<name>/ and /<name>/index slugs would now have the last segment omitted.

You can revert to the previous behavior with slug: /style-guide/style-guide front matter, but IMO it's better if you just set a redirect because I feel like /style-guide/ actually makes more sense.

@markerikson
Copy link
Contributor

Yeah, I think I'm inclined to agree as far as URL patterns go. Let me try updating that PR to do a redirect instead.

@slorber
Copy link
Contributor

slorber commented Apr 20, 2022

Sorry for that

As you are using Netlify you can add a _redirects file in the website/static folder.

This is what we do on our own website: https://github.com/facebook/docusaurus/blob/main/website/static/_redirects

https://docs.netlify.com/routing/redirects/

@Josh-Cena
Copy link

Fixed in #4339 and #4340

@Johngeorgesample
Copy link
Author

Thanks for the quick fix!

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

5 participants