Skip to content

添加Valine评论系统 - #331

Merged
tufu9441 merged 5 commits into
tufu9441:masterfrom
xCss:master
Nov 7, 2017
Merged

添加Valine评论系统#331
tufu9441 merged 5 commits into
tufu9441:masterfrom
xCss:master

Conversation

@xCss

@xCss xCss commented Oct 21, 2017

Copy link
Copy Markdown

添加valine评论系统,并做了如下修改:

/layout/_partial/comments.jade:

if theme.valine.enable == true
    #vcomment
    script(src='//cdn1.lncld.net/static/js/3.0.4/av-min.js')
    script(src='//cdn.jsdelivr.net/gh/xcss/valine@v1.1.7/dist/Valine.min.js' + '?v=' + theme.version)
    script.
      var valine = new Valine({
        el:'#vcomment',
        notify:'#{theme.valine.notify}', 
        verify:'#{theme.valine.verify}', 
        app_id:'#{theme.valine.appid}',
        app_key:'#{theme.valine.appkey}',
        placeholder:'#{theme.valine.placeholder}',
        path: window.location.pathname,
        avatar:'#{theme.valine.avatar}'
      })

_config.yml:

valine:
  enable: false ## if you want to use Valine comment system, please set the value to true
  appid: ## your leancloud application appid
  appkey: ## your leancloud application appkey
  notify:  ## mail notifier , https://github.com/xCss/Valine/wiki
  verify:  ## Verification code
  placeholder: Just go go ## comment input placeholder text 
  avatar: 'mm' ## header image https://github.com/xCss/Valine/wiki

预览图:
Preview

@tufu9441
tufu9441 merged commit bca55d5 into tufu9441:master Nov 7, 2017
@pandaJS404

Copy link
Copy Markdown

2222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants