给自己的网站中添加说说页面,类似于qq空间一样

介绍

🤞使用方便

简略的html片段即可实现,且理论上支持任何框架或单独页面。

🔐安全性高

直接通过leancloud的用户系统,保证只有站长可控发布权限。

🎁多功能输入

多功能输入框,满足你的一切需求,并且支持点赞~

快速使用

若你的主题与本主题一样为Volantis,则可以直接使用Artitalk,直接前往最下面的在Volantis主题中使用查看教程。


开始使用

Leancloud的相关准备

🌍 使用国际版的leancloud

因为leancloud的国内节点需要接入备案域名作为安全域名。明显违背了适用性强的理念。这里推荐大家使用国际版,当然国内版的也可以,但是不要忘了填写severurl即可。

前往leancloud国际版,注册账号。

注册国际版Leancloud账号

前往leancloud国际版,注册账号。

绑定手机号和邮箱

注册完成之后根据leancloud的提示绑定手机号和邮箱

创建应用

创建一个开发版应用,应用名称不限

添加用户

打开这个应用,选择存储用户添加用户

填写用户名和密码(不推荐使用中文哦)记住这个密码,以后发表说说需要用这个用户名和密码登陆的

配置头像

回到结构化数据中,点击class下的_User,选择添加列

新建Class

在结构化数据中创建class,命名为shuoshuo

注意一定要命名为shuoshuo哦

Artitalk 3.1.0版本后拥有了说说评论功能,请在结构化数据中再创建一个class,命名为atComment

设置权限

  • 设置_User class 权限

_User中的权限全部调为指定用户(这个用户就是你新建的那个用户),或者数据创建者,为了保证不被篡改用户数据已达到强制发布说说。

  • 设置shuoshuo class 权限

点击class下的shuoshuo。找到 权限 ,在Class访问权限中将add_fields以及create权限设置为 指定用户 ,输入你刚才输入的用户名会自动匹配。为了安全起见,将deleteupdate也设置为跟它们一样的权限。

设置权限的这几步一定要设置好,才可以保证不被“闲人”破解发布说说的验证

博客配置

  1. 新建一个page页面。
  2. 如果使用Valine评论系统,请关闭该页面的评论功能
  3. 将下方代码直接复制进去
    点击查看代码
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    <script type="text/javascript" src="https://unpkg.com/artitalk"></script>
    <div id="artitalk_main"></div>
    <script>
    new Artitalk({
    appId: '输入你的appid',
    appKey: '输入你的appkey',
    pageSize: 5,
    shuoPla: '想说点啥呢~',
    atEmoji: { //xaoxuu表情
    weibo-doge: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/weibo/weibo-1.png",
    weibo-doge-tuosai: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/weibo/weibo-2.png",
    weibo-doge-shengqi: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/weibo/weibo-3.png",
    weibo-doge-tushe: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/weibo/weibo-4.png",
    aru-1: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-1.gif",
    aru-2: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-2.gif",
    aru-3: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-3.gif",
    aru-4: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-4.gif",
    aru-5: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-5.gif",
    aru-6: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-6.gif",
    aru-7: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-7.gif",
    aru-8: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-8.gif",
    aru-9: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-9.gif",
    aru-10: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-10.gif",
    aru-11: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-11.gif",
    aru-12: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-12.gif",
    aru-13: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-13.gif",
    aru-14: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-14.gif",
    aru-15: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-15.gif",
    aru-16: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-16.gif",
    aru-17: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-17.gif",
    aru-18: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-18.gif",
    aru-19: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-19.gif",
    aru-20: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-20.gif",
    aru-21: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-21.gif",
    aru-22: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-22.gif",
    aru-23: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-23.gif",
    aru-24: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-24.gif",
    aru-25: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-25.gif",
    aru-26: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-26.gif",
    aru-27: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-27.gif",
    aru-28: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-28.gif",
    aru-29: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-29.gif",
    aru-30: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-30.gif",
    aru-31: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-31.gif",
    aru-32: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-32.gif",
    aru-33: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-33.gif",
    aru-34: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-34.gif",
    aru-35: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-35.gif",
    aru-36: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-36.gif",
    aru-37: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-37.gif",
    aru-38: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-38.gif",
    aru-39: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-39.gif",
    aru-40: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-40.gif",
    aru-41: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-41.gif",
    aru-42: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-42.gif",
    aru-43: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-43.gif",
    aru-44: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-44.gif",
    aru-45: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-45.gif",
    aru-46: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-46.gif",
    aru-47: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-47.gif",
    aru-48: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-48.gif",
    aru-49: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-49.gif",
    aru-50: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-50.gif",
    aru-51: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-51.gif",
    aru-52: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-52.gif",
    aru-53: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-53.gif",
    aru-54: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-54.gif",
    aru-55: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-55.gif",
    aru-56: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-56.gif",
    aru-57: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-57.gif",
    aru-58: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-58.gif",
    aru-59: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-59.gif",
    aru-60: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-60.gif",
    aru-61: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-61.gif",
    aru-62: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-62.gif",
    aru-63: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-63.gif",
    aru-64: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-64.gif",
    aru-65: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-65.gif",
    aru-66: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-66.gif",
    aru-67: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-67.gif",
    aru-68: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-68.gif",
    aru-69: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-69.gif",
    aru-70: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-70.gif",
    aru-71: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-71.gif",
    aru-72: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-72.gif",
    aru-73: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-73.gif",
    aru-74: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-74.gif",
    aru-75: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-75.gif",
    aru-76: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-76.gif",
    aru-77: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-77.gif",
    aru-78: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-78.gif",
    aru-79: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-79.gif",
    aru-80: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-80.gif",
    aru-81: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-81.gif",
    aru-82: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-82.gif",
    aru-83: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-83.gif",
    aru-84: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-84.gif",
    aru-85: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-85.gif",
    aru-86: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-86.gif",
    aru-87: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-87.gif",
    aru-88: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-88.gif",
    aru-89: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-89.gif",
    aru-90: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-90.gif",
    aru-91: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-91.gif",
    aru-92: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-92.gif",
    aru-93: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-93.gif",
    aru-94: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-94.gif",
    aru-95: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-95.gif",
    aru-96: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-96.gif",
    aru-97: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-97.gif",
    aru-98: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-98.gif",
    aru-99: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-99.gif",
    aru-100: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-100.gif",
    aru-101: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-101.gif",
    aru-102: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-102.gif",
    aru-103: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-103.gif",
    aru-104: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-104.gif",
    aru-105: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-105.gif",
    aru-106: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-106.gif",
    aru-107: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-107.gif",
    aru-108: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-108.gif",
    aru-109: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-109.gif",
    aru-110: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-110.gif",
    aru-111: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-111.gif",
    aru-112: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-112.gif",
    aru-113: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-113.gif",
    aru-114: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-114.gif",
    aru-115: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-115.gif",
    aru-116: "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/aru/aru-116.gif",
    },
    })
    </script>
  4. 修改里面的appIdappKey
  5. 执行hexo s测试下能不能正常使用吧
  6. 其他相关配置及说明请前往Artitalk文档查看哦~

在Volantis主题中使用

请先完成Leancloud的相关准备

配置方法

  1. 新建一个page页面
  2. 修改layout为artitalk
  3. 在主题配置文件中配置相关项即可
  4. 在主题配置文件中的pjax.banUrl中添加该说说页面的链接
  5. 是不是炒鸡简单鸭
  6. 关于Volantis主题的使用及在Volantis使用Artitalk的疑问都可以来群里问哦~
  7. QQ群:1146399464点击群号码查看加群方法。

最后都看到这里了,不如留下个脚印代表你来过~

如果觉得本教程对你有帮助,可以分享给朋友鸭~

评论