Now I’m going to add Disqus comments to my AMP site. Disqus already supports this and has an official guide about it. The whole process is smooth with only few exceptions.
- You need to have a separate domain. This is not an issue for me. If you don’t have an extra domain, you can host your disqus HTML file in GitHub or other places. Or you can use a universal HTML file as discussed in this GitHub issue.
- An extra element with
overflowneeds to be added as child of
<amp-iframe width=600 height=140
- The hash of the Disqus URL should be unique. My site is generated using Hexo, so I use
page.disqusId || page.slugas the hash.