GIAO DIỆN TEMPLATE AMP SỬ DỤNG HỆ THỐNG COMMENT NÀO?

giao diện template AMP sử dụng 1 số hệ thống comment khác sẽ bị lỗi vì thế, giao diện AMP phải sử dụng hệ thống comment của Disqus, sẽ không bị lỗi.

Phần lớn các mẫu template AMP thường tích hợp sẵn hệ thống comment của disqus này.

Chính vì thế bạn cần tạo 1 tài khoản để có 1 tên ID truy cập tại disqus.com để thay thế vào code như bên dưới.

Code đặt disqus comment sẽ có dạng như sau:

<b:includable id=’disqus-comments’ var=’post’>
<div class=’disqus-comments’ id=’disqus_comments’>
<amp-iframe expr:src=’&quot;https://cdn.rawgit.com/KompiAjaib/kompi-html/master/disqus_amp2.html?shortname=kompi-design&amp;url=&quot; + data:blog.canonicalUrl’ frameborder=’0′ height=’300′ layout=’responsive’ resizable=’resizable’ sandbox=’allow-scripts allow-same-origin allow-modals allow-popups’ width=’600′> <div aria-label=’Disqus Comments’ overflow=” role=’button’ tabindex=’0′>Disqus Comments</div>
</amp-iframe>
</div>
</b:includable>

Các bạn hãy thay thế kompi-design trong đoạn code dưới đây với tên truy cập của bạn đã tạo tại Disqus.com để thay thế vào là xong !

Chúc các bạn thành công !

Viết một bình luận