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

Restructure tag page - change the logic of tag rendering #576

Merged
merged 2 commits into from
Apr 14, 2024

Conversation

JiangLong2019
Copy link

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after), along with a short summary of changes:

Issue

Fixes #575

Changelog:

  1. In feed block and breadcrumb, change the way of getting tag id identifier from url parameter to path. Ex, feed-tags=XXX -> /tag/XXX.
  2. In tag block, change the tag link format from url parameter to path. Ex, feed-tags=XXX -> /tag/XXX.
  3. Remove tag URL parameter redirection from 404.html
  4. Redirect existing tag page URL to the new format.

Test URLs:

@JiangLong2019 JiangLong2019 requested a review from sdmcraft April 11, 2024 09:53
Copy link

aem-code-sync bot commented Apr 11, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Apr 11, 2024

Page Scores Audits Google
/healthy-thinking/tag/education PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@JiangLong2019
Copy link
Author

@sdmcraft EDS doesn't support url parameters in redirect source URL, I'll try to find any other way to deal with it rather than redirects.xls

Redirect existing tag page URL to the new format.

https://discord.com/channels/1131492224371277874/1207624789083168768/1207749171969265664

@jindaliiita
Copy link

Changes looks fine to me

@sdmcraft
Copy link

@sdmcraft EDS doesn't support url parameters in redirect source URL, I'll try to find any other way to deal with it rather than redirects.xls

Redirect existing tag page URL to the new format.

https://discord.com/channels/1131492224371277874/1207624789083168768/1207749171969265664

If query parameter based redirects are not possible then how would we solve the original problem i.e. having the right canonical url on the page?

@JiangLong2019
Copy link
Author

@sdmcraft

If query parameter based redirects are not possible then how would we solve the original problem i.e. having the right canonical url on the page?

After the change, each tag page owns correct canonical url now. The problem is that we wanted to redirect current site tag page to the new tag page, let's say,
Current tag page - https://www.sunstar.com/healthy-thinking/tag?feed-tags=germany
New tag page - https://www.sunstar.com/healthy-thinking/tag/germany

In redirects.xls, the source URL doesn't support URL with parameter, we cannot use redirects.xls for the redirection. In my opinion, I don't think it's necessary, maybe we can ignore it.

@JiangLong2019
Copy link
Author

@sdmcraft As we discussed, I've added the redirection for URL parameter tag page. Please have a check.
https://github.com/hlxsites/sunstar/pull/576/files#diff-fbceb58f32b99b8a5309251f8c49ac8eda82fba58b905c600c92bce1ed2a1c8c

@JiangLong2019 JiangLong2019 merged commit 9de0d9f into main Apr 14, 2024
4 checks passed
@JiangLong2019 JiangLong2019 deleted the issue575 branch April 14, 2024 07:15
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.

Restructure tag page - change the logic of tag rendering
3 participants