Discourse Comment Embed to Support Google AMP?

This won’t help you unless you’re using WordPress for your site. After reading this topic I tried out the WP Discourse plugin combined with the Automattic amp-wp plugin. I’ve only tried this on a development site, but it seems it can be made to work by adding a function to WP Discourse that appends the comments template directly to the post content when a request is made for an AMP page.

Here’s the output after making a few css changes for AMP pages (this could be improved.)

The publishing template that’s used to publish posts to Discourse can be customized to include a link back to the AMP version of the post.

I’m not very familiar with AMP, so there could be issues that I’m not taking into account.

4 Likes