示例

查看 Awesome Comment 的实际效果。试试下方的在线演示,或将其嵌入你自己的网站。

在线演示

这是一个真实的 Awesome Comment 组件,试试留下评论吧!

嵌入代码

复制以下代码,将 Awesome Comment 添加到你的网站。

terminal
<link rel="stylesheet" href="https://unpkg.com/@roudanio/awesome-comment@latest/dist/style.css">
<script type="module">
  import {getInstance} from 'https://unpkg.com/@roudanio/awesome-auth@latest/dist/awesome-auth.js';
  import Comment from 'https://unpkg.com/@roudanio/awesome-comment@latest/dist/awesome-comment.js';

  const auth = getInstance({
    googleId: "YOUR_GOOGLE_CLIENT_ID",
    root: "https://awesomecomment.org/api/site/auth",
  });

  Comment.init(document.querySelector('#comment'), {
    postId: location.pathname,
    siteId: "YOUR_SITE_ID",
    apiUrl: "https://awesomecomment.org",
    awesomeAuth: auth,
    locale: navigator.language,
  });
</script>

<div id="comment"></div>