next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.38k stars 421 forks source link

打开浏览人数时,首页显示失败,且post出现两个展示人数 #625

Closed LeenHawk closed 1 year ago

LeenHawk commented 1 year ago

Issue Checklist

Expected behavior

只出现一个展示人数

Actual behavior

Steps to reproduce the behavior

按源码中_config.yml,打开busuanzi统计(leancloud实验了也会)

Node.js and NPM Information

v19.7.0
9.6.1

Package dependencies Information

├── hexo-abbrlink@2.2.1
├── hexo-deployer-git@4.0.0
├── hexo-deployer-rsync@2.0.0
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-leancloud-counter-security@1.5.0
├── hexo-next-artalk@0.1.2
├── hexo-related-posts@1.5.1
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-pandoc@0.3.1
├── hexo-renderer-stylus@2.1.0
├── hexo-server@3.0.0
├── hexo-submit-urls-to-search-engine@2.1.0
├── hexo-theme-landscape@0.0.3
├── hexo-theme-next@8.15.0
├── hexo-word-counter@0.1.0
└── hexo@6.3.0

Hexo Configuration

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

# Site
title: "LeenHawk的网络日志"
subtitle: '分享学习心得和日常见闻'
description: '分享一些高性能计算有关知识和一些别的杂学'
keywords: 高性能计算,C/C++,物理模拟,算法
author: "LeenHawk"
language: zh-CN
timezone: 'Asia/Shanghai'

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://blog.leenhawk.com
permalink: posts/:abbrlink/ 
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: true
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'date'

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
- type: cjh_bing_url_submitter
- type: cjh_baidu_url_submitter

# Artalk Config File
## For more information: https://artalk.js.org

artalk:
  enable: true

  # Backend server API, you should set this to your own server API
  server: https://artalk.leenhawk.com

  # Site name, you can set this to specify site for server
  # or leave blank to use default site
  site: "LeenHawk的网络日志"

  # Frontend resources CDN, you can set this to your preferred CDN
  ## Reference: https://artalk.js.org/guide/frontend/install.html
  jsUrl: https://unpkg.com/artalk@2/dist/Artalk.js
  cssUrl: https://unpkg.com/artalk@2/dist/Artalk.css

  # Page views count
  pvCount: true

  # Comments count
  commentCount: true

  # Dark mode
  darkMode: auto

  # Use backend to config
  ## Reference: https://artalk.js.org/guide/backend/fe-control.html
  useBackendConf: true

tag_generator:
  enable_index_page: false

sitemap:
  path: 
    - sitemap.xml
    - sitemap.txt
  template: ./sitemap_template.xml
  template_txt: ./sitemap_template.txt
  rel: false
  tags: true
  categories: true

symbols_count_time:
  symbols: true
  time: true
  total_symbols: true
  total_time: true
  exclude_codeblock: false
  wpm: 275
  suffix: "mins."

search:
  path: search.xml
  field: post
  content: true
  format: html

abbrlink:
  alg: crc32      #support crc16(default) and crc32
  rep: dec        #support dec(default) and hex
  drafts: false   #(true)Process draft,(false)Do not process draft. false(default) 
  # Generate categories from directory-tree
  # depth: the max_depth of directory-tree you want to generate, should > 0
  auto_category:
     enable: true  #true(default)
     depth: 4       #3(default)
     over_write: false 
  auto_title: false #enable auto title, it can auto fill the title by path
  auto_date: false #enable auto date, it can auto fill the date by time today
  force: false #enable force mode,in this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had abbrlink. This only updates abbrlink rather than other front variables.

hexo_submit_urls_to_search_engine:
  submit_condition: count #链接被提交的条件,可选值:count | period 现仅支持count
  count: 10 # 提交最新的10个链接
  period: 900 # 提交修改时间在 900 秒内的链接
  google: 0 # 是否向Google提交,可选值:1 | 0(0:否;1:是)
  bing: 1 # 是否向bing提交,可选值:1 | 0(0:否;1:是)
  baidu: 0 # 是否向baidu提交,可选值:1 | 0(0:否;1:是)
  txt_path: submit_urls.txt ## 文本文档名, 需要推送的链接会保存在此文本文档里
  baidu_host:  ## 在百度站长平台中注册的域名
  baidu_token:  ## 请注意这是您的秘钥, 所以请不要把它直接发布在公众仓库里!
  bing_host: https://blog.leenhawk.com ## 在bing站长平台中注册的域名
  bing_token:  ## 请注意这是您的秘钥, 所以请不要把它直接发布在公众仓库里!
  google_host:  ## 在google站长平台中注册的域名
  google_key_file: Project.json #存放google key的json文件,放于网站根目录(与hexo _config.yml文件位置相同),请不要把json文件内容直接发布在公众仓库里!
  google_proxy:  # 向谷歌提交网址所使用的系统 http 代理,填 0 不使用
  replace: 0  # 是否替换链接中的部分字符串,可选值:1 | 0(0:否;1:是)
  find_what: 
  replace_with: 

leancloud_counter_security:
  enable_sync: false
  app_id: 
  app_key: 
  username: leenhawk # Will be asked while deploying if is left blank
  password: # Recommmended to be left blank. Will be asked while deploying if is left blank

NexT Configuration

minify: true
custom_file_path:
  style: source/_data/styles.styl

scheme: Gemini
darkmode: true

favicon:
  small: /images/favicon/favicon-16x16.png
  medium: /images/favicon/favicon-32x32.png
  apple_touch_icon: /images/favicon/apple-touch-icon.png
  safari_pinned_tab: /images/favicon/safari-pinned-tab.svg
  android_manifest: /images/favicon/site.webmanifest

creative_commons:
  # Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | cc-zero
  license: by-nc-sa
  # Available values: big | small
  size: small
  sidebar: true
  post: true
  # You can set a language value if you prefer a translated version of CC license, e.g. deed.zh
  # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org
  language: zh-CN

menu:
  home: / || fa fa-home
  about: /about/ || fa fa-user
  tags: /tags/ || fa fa-tags
  categories: /categories/ || fa fa-th
  archives: /archives/ || fa fa-archive
  links: /links/ || fa fa-link
  #schedule: /schedule/ || fa fa-calendar
  sitemap: /sitemap.xml || fa fa-sitemap
  #commonweal: /404/ || fa fa-heartbeat

menu_settings:
  icons: true
  badges: true

avatar:
  # Replace the default image and set the url here.
  url: /images/favicon/avatar.png
  # If true, the avatar will be displayed in circle.
  rounded: true

social:
  GitHub: https://github.com/LeenHawk || fab fa-github
  E-Mail: mailto:leenhawk123@outlook.com || fa fa-envelope
  #Weibo: https://weibo.com/yourname || fab fa-weibo
  #Twitter: https://twitter.com/yourname || fab fa-twitter
  #FB Page: https://www.facebook.com/yourname || fab fa-facebook
  StackOverflow: https://stackoverflow.com/users/21381948/leen-hawk || fab fa-stack-overflow

social_icons:
  enable: true
  icons_only: false
  transition: true

language_switcher: true

footer:
  # Specify the year when the site was setup. If not defined, current year will be used.
  since: 2020

symbols_count_time:
  separated_meta: true
  item_text_total: true

follow_me:
  RSS: /atom.xml || fa fa-rss

preconnect: true

mobile_layout_economy: true

codeblock:
  copy_button:
    enable: true
    # Available values: default | flat | mac
    style: default

back2top:
  enable: true
  # Back to top in sidebar.
  sidebar: false
  # Scroll percent label in b2t button.
  scrollpercent: true

reading_progress:
  enable: true

bookmark:
  enable: true

github_banner:
  enable: true
  permalink: https://github.com/LeenHawk

index_with_subtitle: true

# Automatically add external URL with Base64 encrypt & decrypt.
exturl: true

note:
  # Note tag style values:
  #  - simple    bootstrap callout old alert style. Default.
  #  - modern    bootstrap callout new (v2-v3) alert style.
  #  - flat      flat callout style with background, like on Mozilla or StackOverflow.
  #  - disabled  disable all CSS styles import of note tag.
  style: modern
  icons: true

tabs:
  # Make the nav bar of tabs with long content stick to the top.
  sticky: false
  transition:
    tabs: true
    labels: false

pdf:
  enable: true

mermaid:
  enable: true

math:

  mathjax:
    enable: true
    # Available values: none | ams | all
    tags: ams

pjax: true

mediumzoom: true

lazyload: true

pangu: true

quicklink:
  enable: true

  # Default (true) will initialize quicklink after the load event fires.
  delay: true
  # Custom a time in milliseconds by which the browser must execute prefetching.
  timeout: 300

motion:
  enable: true

pace:
  enable: true

busuanzi_count:
  enable: true

local_search:
  enable: true

Other Information

应该是哪重复加载了,就首页那个阅读人数被重复加载到post页了,而且首页阅读人数显示不出来

welcome[bot] commented 1 year ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 1 year ago

你使用的 artalk 评论系统已经自带了阅读次数。你再打开 busuanzi统计或者 leancloud 当然就有两个了…

LeenHawk commented 1 year ago

你使用的 artalk 评论系统已经自带了阅读次数。你再打开 busuanzi统计或者 leancloud 当然就有两个了…

有道理,沙雕了

github-actions[bot] commented 3 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.