discourse/app
David Taylor 3329484e2d
FEATURE: Simplify crawler content for non-canonical post URLs (#26324)
When crawlers visit a post-specific URL like `/t/-/{topic-id}/{post-number}`, we use the canonical to direct them to the appropriate crawler-optimised paginated view (e.g. `?page=3`).

However, analysis of google results shows that the post-specific URLs are still being included in the index. Google doesn't tell us exactly why this is happening. However, as a general rule, 'A large portion of the duplicate page's content should be present on the canonical version'.

In our previous implementation, this wasn't 100% true all the time. That's because a request for a post-specific URL would include posts 'surrounding' that post, and won't exactly conform to the page boundaries which are used in the canonical version of the page. Essentially: in some cases, the content of the post-specific pages would include many posts which were not present on the canonical paginated version.

This commit aims to resolve that problem by simplifying the implementation. Instead of rendering posts surrounding the target post_number, we will only render the target post, and include a link to 'show post in topic'. With this new implementation, 100% of the post-specific page content will be present on the canonical paginated version, which will hopefully mean google reduces their  indexing of the non-canonical post-specific pages.
2024-03-26 15:18:46 +00:00
..
assets FIX: calendar options part 2 (#26371) 2024-03-26 15:19:02 +01:00
controllers DEV: Load theme objects typed setting metadata when routing to editor (#26354) 2024-03-26 14:02:05 +08:00
helpers PERF: Remove unnecessary `<link rel="preload">` (#26219) 2024-03-18 20:07:29 +08:00
jobs PERF: only allow one reviewable notification at a time (#26330) 2024-03-22 17:37:06 -04:00
mailers FIX: Add higher read & open timeouts for group SMTP emails (#24593) 2023-11-28 15:32:59 +10:00
models DEV: Reduce duplication (#26329) 2024-03-25 11:56:32 -05:00
serializers DEV: Load theme objects typed setting metadata when routing to editor (#26354) 2024-03-26 14:02:05 +08:00
services DEV: Promote block problem checks to ProblemCheck (#26193) 2024-03-20 08:52:25 +08:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00