Skip to content

Conversation

@alexwpengine
Copy link
Contributor

@alexwpengine alexwpengine commented May 7, 2025

In docs-layout.jsx we will format the url and send it correctly to seo.jsx.
In seo.jsx we will just cover cases where we "forgot" to format it prior passing it.

Perhaps, it is an overkill for check twice and format it but safety first. Let me know what do you think.

@headless-platform-by-wp-engine

Check out the recent updates to your Headless Platform preview environment:

App Environment URL Build
faustjs.org preview-env-chore-fix-canonicals-remove-queries N/A ❌ (logs)

Learn more about preview environments in our documentation.

Copy link
Member

@moonmeister moonmeister left a comment

Choose a reason for hiding this comment

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

The issue isn't the URL has a query param. The issue is the source of the URL should never be the next router. Right?

Do we have the url of the page for the markdown? even if we do have to use the router we can use pathname instead of string splitting on '?'.

I disagree with all the changes in SEO.jsx. It should error if no url is passed among other things.

@alexwpengine
Copy link
Contributor Author

I'm reverting seo.jsx.

I am not sure what do you mean by "source of the URL should never be in the next router".

In docs page, we have pathname: "/docs/[[...slug]]", asPath returns the url correctly but it also adds the query params. The other pages are fine because the url is hardcoded directly.

I used the router.query params approach - let me know what do you think.

@headless-platform-by-wp-engine

Check out the recent updates to your Headless Platform preview environment:

App Environment URL Build
faustjs.org preview-env-chore-fix-canonicals-remove-queries https://hh…wered.com ✅ (logs)

Learn more about preview environments in our documentation.

@alexwpengine alexwpengine requested a review from moonmeister May 13, 2025 09:11
@moonmeister moonmeister enabled auto-merge May 13, 2025 20:09
@moonmeister moonmeister merged commit af0ef47 into main May 13, 2025
3 of 4 checks passed
@moonmeister moonmeister deleted the chore-fix-canonicals-remove-queries branch May 13, 2025 20:10
Copy link
Contributor

@Fran-A-Dev Fran-A-Dev left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

5 participants