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 Support for Jetpack / WP.com related posts #124

Closed
mjangda opened this issue Jan 25, 2016 · 7 comments
Closed

Add Support for Jetpack / WP.com related posts #124

mjangda opened this issue Jan 25, 2016 · 7 comments
Labels
Enhancement New feature or improvement of an existing one Integration: Jetpack

Comments

@mjangda
Copy link
Contributor

mjangda commented Jan 25, 2016

No description provided.

@mjangda mjangda added Enhancement New feature or improvement of an existing one Integration: Jetpack labels Jan 25, 2016
@gibrown
Copy link

gibrown commented Jan 26, 2016

Took a quick look at how to implement this. We currently only render related posts on the client side for Jetpack. I think with the implied caching of AMP that it would be better to render the related posts on the page load. Links of course should get changed to point to the amp version of the pages.

Doing this requires adding a new method of rendering the related posts in https://github.com/Automattic/jetpack/blob/master/modules/related-posts/jetpack-related-posts.php

@mjangda
Copy link
Contributor Author

mjangda commented Jan 26, 2016

We could possible use amp-list (I even wrote an example for it :) https://github.com/Automattic/amp-wp#custom-embed-handler) although, it expects the endpoint to return data in a specific format (namely, it wants a JSON object with an items key). (turns out we already use items as a key; it might "just work" :))

@gibrown
Copy link

gibrown commented Jan 26, 2016

Interesting, ya that could be made to work. Right now related posts passes the query through to the site where various filters are applied rather than hitting our public api directly.

The benefit of embedding it in the original html is that we can probably use any existing filters or customizations that the user has applied. But maybe those customizations wouldn't make sense anyways with AMP.

@gibrown
Copy link

gibrown commented Jan 26, 2016

Oh, also we should add some sort of click tracking for clicking on the related posts, but I think this is a general problem with Jetpack Related posts.

@mjangda mjangda changed the title Restore Jetpack / WP.com related posts Jetpack / WP.com related posts Aug 18, 2016
@gibrown
Copy link

gibrown commented Oct 17, 2016

Per https://www.alexkras.com/google-may-be-stealing-your-mobile-traffic/ this should maybe be implemented in general. When a related posts system exists, then use that. When it doesn't exist, then show the X most recent posts other than the current post. Try to keep the user on the current site.

@amedina amedina changed the title Jetpack / WP.com related posts Add Support for Jetpack / WP.com related posts Nov 3, 2017
@westonruter
Copy link
Member

This should rather be added to the Jetpack plugin itself. See #1021.

@westonruter
Copy link
Member

For the Jetpack issue specifically for Related Posts compatibility with AMP, see Automattic/jetpack#9556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement of an existing one Integration: Jetpack
Projects
None yet
Development

No branches or pull requests

3 participants