discourse/app/helpers
Sam de9a031073
FEATURE: use canonical links in posts.rss feed (#16190)
* FEATURE: use canonical links in posts.rss feed

Previously we used non canonical links in posts.rss

These links get crawled frequently by crawlers when discovering new
content forcing crawlers to hop to non canonical pages just to end up
visiting canonical pages

This uses up expensive crawl time and adds load on Discourse sites

Old links were of the form:

`https://DOMAIN/t/SLUG/43/21`

New links are of the form

`https://DOMAIN/t/SLUG/43?page=2#post_21`

This also adds a post_id identified element to crawler view that was
missing.

Note, to avoid very expensive N+1 queries required to figure out the
page a post is on during rss generation, we cache that information.

There is a smart "cache breaker" which ensures worst case scenario is
a "page drift" - meaning we would publicize a post is on page 11 when
it is actually on page 10 due to post deletions. Cache holds for up to
12 hours.

Change only impacts public post RSS feeds (`/posts.rss`)
2022-03-15 20:17:06 +11:00
..
application_helper.rb FIX: Update application_helper logic now that Ember CLI is default (#15935) 2022-02-14 13:48:18 +00:00
common_helper.rb FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
email_helper.rb FIX: Do not interpret backreferences in email content 2021-07-08 15:56:09 -07:00
embed_helper.rb FIX: Display small post actions when embedding a topic (#9278) 2020-03-26 09:07:41 -03:00
emoji_helper.rb FEATURE: Render emojis on GitHub labels when oneboxing an issue. (#13531) 2021-06-25 14:48:36 -03:00
list_helper.rb
posts_helper.rb FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
qunit_helper.rb PERF: Update ember-auto-import and webpack (#15919) 2022-02-14 11:21:39 +00:00
topics_helper.rb Improve support for old browsers (#9515) 2020-04-29 21:40:21 +03:00
user_notifications_helper.rb DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00