【Hexo】04-Next插件配置

img-74

Next主题配置

搜索引擎

搜索引擎官方文档https://theme-next.js.org/docs/theme-settings/seo.html

主题配置

1
index_with_subtitle: true

百度

站点管理

百度站点管理网站

  1. 添加网站
    img-75

  2. 填写网站信息

    img-76

  3. 网站内容选择

    img-77

  4. 验证网站

    这里选择HTML标签验证的方式

    img-78

  5. 复制content中的内容,到baidu_site_verification

    1
    baidu_site_verification: ***********

评论区

评论系统官方文档https://theme-next.js.org/docs/third-party-services/comments.html#Changyan-China

评论区配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ---------------------------------------------------------------
# Comments Settings
# See: https://theme-next.js.org/docs/third-party-services/comments
# ---------------------------------------------------------------

# Multiple Comment System Support
# 多评论系统
comments:
# Available values: tabs | buttons
style: tabs
# Choose a comment system to be displayed by default.
# Available values: disqus | disqusjs | changyan | livere | gitalk | utterances
active:
# Setting `true` means remembering the comment system selected by the visitor.
# 记住访客选择的评论系统
storage: true
# Lazyload all comment systems.
# 是否启动懒加载
lazyload: false
# Modify texts or order for any naves, here are some examples.
nav:
#disqus:
# text: Load Disqus
# order: -1
#gitalk:
# order: -2

changyan(畅言评论)

该评论需要用户登录。如QQ、微信等

配置评论区

  1. 注册畅言

  2. 添加站点

    img-81

  3. 配置站点

    img-82

  4. 获取APP ID,APP SECRET

    img-80

  5. _config.next.yml修改配置文件

    1
    2
    3
    4
    5
    6
    # Changyan
    # For more information: https://changyan.kuaizhan.com
    changyan:
    enable: true
    appid:
    appkey:
  6. 查看页面

    评论区登录页

    img-84

    评论区

    img-83

取消页面评论区

评论区设置成功后,我们会发现每一个页面都有评论区,所以我们需要取消某些页面的评论区

index.md文件中添加如下代码:comments: false

如图:

img-85

-------------本文结束感谢您的阅读-------------