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 · 6 comments

Comments

Projects
None yet
3 participants
@mjangda
Copy link
Contributor

commented Jan 25, 2016

No description provided.

@gibrown

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Mar 15, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.