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

Add redirects for docs changes and update formatting #446

Merged

Conversation

ndiego
Copy link
Member

@ndiego ndiego commented Dec 15, 2023

This PR adds redirects for a few recent changes to the Block Editor Handbook.

Note

Many of the redirects go to the same destination, so if there is a more efficient way of doing this, just let me know, and I'll update the PR.

@ndiego ndiego self-assigned this Dec 15, 2023
Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in sandbox; existing redirects work going to new locations. New redirects won't work until the old pages 404, but new locations look good.

@adamwoodnz adamwoodnz merged commit a4977eb into WordPress:trunk Dec 17, 2023
1 check passed
@ndiego ndiego deleted the add-redirects-for-documentation-updates branch December 17, 2023 23:37
@pkevan
Copy link

pkevan commented Dec 18, 2023

Many of the redirects go to the same destination, so if there is a more efficient way of doing this, just let me know

For redirects it's usually best to be explicit with them, rather than do some fancy regex or wildcard, so the method was good 👍

@ndiego
Copy link
Member Author

ndiego commented Dec 18, 2023

@pkevan do you know if this has been deployed yet? I have tested setting https://developer.wordpress.org/block-editor/getting-started/create-block/finishing/ to draft. This should redirect to https://developer.wordpress.org/block-editor/getting-started/tutorial, but I am still getting a 404.

@pkevan
Copy link

pkevan commented Dec 18, 2023

Not sure - will take a look.

@pkevan
Copy link

pkevan commented Dec 18, 2023

I think it might be the structure of the handbook page - presumably they all need to be draft in order for the redirects to work. i.e. create-block parent item?

@adamwoodnz
Copy link
Contributor

Debugged and found the issue; the paths in $redirects shouldn't have a trailing slash. I'll push a fix.

@ndiego
Copy link
Member Author

ndiego commented Dec 18, 2023

Ah, thanks @adamwoodnz. Sorry about that!

adamwoodnz added a commit that referenced this pull request Dec 18, 2023
Fixes issues with path comparison

See #446
@adamwoodnz
Copy link
Contributor

Deployed, appears to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants