qutang / hexo-theme-cutie

A hexo theme called cutie
https://hexo-theme-cutie.qutang.dev
MIT License
75 stars 18 forks source link

Disqus comments dosn't work #55

Closed Fastbyte01 closed 6 years ago

Fastbyte01 commented 6 years ago

Hi @qutang , I'm testing your theme and is good. I have tried to use disqus for comments but the configuration dosn't seems that work.

I don't have great experience with javascript ( I start from little to study it) and don't know how to see where is the problem.

I tried the info on your site to configure but dosn't seems work.

Fastbyte01 commented 6 years ago

Seems that allow_comment: false dosn't work.

qutang commented 6 years ago

Did you set the short name?

Also, where did you set the allow_comment variable? front matter or the data file?

Fastbyte01 commented 6 years ago

Hi @qutang If I set the variable allowcomment on /data/cutie.yml, the variable dosn't work. If I set the variable allow_comment on the root config.yml, it works.

Fastbyte01 commented 6 years ago

For the shortname, I have set it as in the documentation but dosn't seems to work.

qutang commented 6 years ago

I see. I'll try to test it. Thank you for the feedback.

qutang commented 6 years ago

I tested the shortname variable and it is working.

You need to set both: global.comment_system to disqus and disqus.shortname to your site's shortname. shortname should be configured in _data/cutie.yml file, not in _config.yml file.

Fastbyte01 commented 6 years ago

I made it but it continue to give me the error: For site maintainer: Please provide shortname in your _data/cutie.yml file for disqus comment system.

qutang commented 6 years ago

Can you post a snippet of the configuration file? I can't think of a cause of that. Also can you retry in v2.0.10?

And also check if the shortname is correct (normally it should be your domain name connected with dash)

Fastbyte01 commented 6 years ago

This is the code on _data/cutie.yml inside my source folder.

version: 2.0.10
url: 
logo: /images/logo.jpg
slogan: Bazinga!
# Configure navigation menu, provide a relative link and a path to icon (icon should better be square)

# As long as the name matches the font awesome icon name, you can add even more social links
# As the tip: the social link can be a QRCODE link
github: https://github.com/qutang
linkedin: https://www.linkedin.com/in/qutang

global:
  comment_system: disqus # disqus, valine, gitment
  disqus:
    shortname: username.disqus.com
  scheme: 
    name: Taurus #Taurus
    color: flower
  icon_set: blue-shadow
  use_animation: false

page_404:
  tencent_404: false

post:
  allow_share: true
  allow_modification: false
  allow_commercial: false
  use_lightgallery: true
  allow_comment: true
  toc_level: 6
  enable_unread_badge: false

This is the code on the root _config

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: Fastbyte01
subtitle: Naturalmente Nerd
description:
keywords:
author: Fastbyte01
language: it
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :title/
permalink_defaults:

highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace: 
markdown:
  render:
    html: true
    xhtmlOut: false
    breaks: false
    linkify: true
    typographer: true
    quotes: '“”‘’'
  plugins:
    - markdown-it-abbr
    - markdown-it-footnote
    - markdown-it-ins
    - markdown-it-sub
    - markdown-it-sup
    - markdown-it-deflist
  anchors:
    level: 1
    collisionSuffix: 'v'
    permalink: false
    permalinkClass: header-anchor
    permalinkSymbol: ""
    permalinkBefore: false
date_format: D MMM YY
archive_generator:
  per_page: 0
  yearly: true
  monthly: false
  daily: false
theme: cutie
Fastbyte01 commented 6 years ago

Probably I have made a mistake but can't see it.

qutang commented 6 years ago

Yeah. disqus.shortname should not be under global, it should be the root itself.

Fastbyte01 commented 6 years ago

Sorry, a my stupid error. Thanks for the support.