Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加Valine评论系统 #331

Merged
merged 5 commits into from Nov 7, 2017
Merged

添加Valine评论系统 #331

merged 5 commits into from Nov 7, 2017

Conversation

xCss
Copy link

@xCss xCss commented Oct 21, 2017

添加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

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.

None yet

3 participants