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

Port Related Posts to work with AMP #9556

Closed
gravityrail opened this issue May 15, 2018 · 6 comments · Fixed by #9458 or #13028
Closed

Port Related Posts to work with AMP #9556

gravityrail opened this issue May 15, 2018 · 6 comments · Fixed by #9458 or #13028
Labels
AMP [Feature] Related Posts [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@gravityrail
Copy link
Contributor

In #9458 we propose disabling Related Posts as it is broken on AMP sites, primarily due to the reliance on javascript to load the related posts from WPCOM.

This issue was created to track making this features work with AMP.

A fix would be to load, cache and render the related posts area server-side.

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Related Posts labels May 15, 2018
@gravityrail gravityrail reopened this May 18, 2018
@westonruter
Copy link
Contributor

I think this needs the AMP Support label.

@jeherve jeherve added the AMP label May 21, 2018
@stale
Copy link

stale bot commented Nov 17, 2018

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@westonruter
Copy link
Contributor

westonruter commented Jan 18, 2019

I tweeted about this in September but I neglected to comment on this issue: I made a compatibility plugin to a subset of get Related Posts to work work in AMP.

You can see it live on this AMP page: https://make.xwp.co/2018/12/01/amp-plugin-release-v1-0-rc4/?amp

image

Here's the gist that shims AMP support into Jetpack: https://gist.github.com/westonruter/1515ce1bae788e6d52d1a94ddd61fb59

The amount of code would be less if integrated straight into the Related Posts module.

Also, this code assumes AMP pages being served in paired/native modes. Additional logic would be needed for classic mode.

@htdat
Copy link
Member

htdat commented Jun 28, 2019

2133418-zen

@htdat
Copy link
Member

htdat commented Jul 10, 2019

2169258-zen

@gravityrail
Copy link
Contributor Author

@westonruter any chance you could review this? #13028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP [Feature] Related Posts [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
4 participants