刘勇虎的官方网站
网站内容包含大前端、服务器开发、Python开发、iOS开发、Android开发、网站维护等技术文章。专注于分享技术经验,职业心得体会,IT优秀文章与教程创作。
Stay hungry,Stay foolish,Stay young
题记
从青岛回来已是凌晨两点,累坏了,打开了放着孔雀鱼的塑料透明碗,发现我家鱼生了,也是高兴。回到公司,改了下代码,下班了弄了下博客。用valine设置了网站的评论系统,感觉还不错.
言归正传
<head>
...
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
...
</head>
<body>
...
<div id="vcomments"></div>
<script>
new Valine({
el: '#vcomments',
appId: '<API_ID>',
appKey: '<API_Key>'
})
</script>
</body>
new Valine({
el: '#vcomments' ,
appId: '<APP_ID>',
appKey: '<APP_KEY>',
notify:false,
verify:false,
avatar:'mm'
placeholder: 'just go go',
path:window.location.pathname,
});
# Install leancloud's js-sdk
npm install leancloud-storage --save
# Install valine
npm install valine --save
// Register AV objects to the global
window.AV = require('leancloud-storage');
// Use import
import Valine from 'valine';
// or Use require
const Valine = require('valine');
new Valine({
el:'#vcomments',
// other config
})
# Install leancloud's js-sdk
npm install leancloud-storage --save
comment:
use: valine
shortname: http-miccall-tech
duoshuo_thread_key_type: path
duoshuo_embed_js_url: "https://static.duoshuo.com/embed.js"
changyan_appid:
changyan_conf:
changyan_thread_key_type: path
# 使用 valine 请先执行 npm install valine --save
valine: # Valine Comment System https://github.com/xCss/Valine
on: true
appId: 'appId'
appKey: 'appKey'
notify: true
verify: false
placeholder: Please leave your footprints
avatar: ''
avatar_cdn: https://gravatar.loli.net/avatar/ # avatar CDN address, default gravatar.loli.net
pageSize: 10 # comments of one page
ok ~