0%

next主题配置

04 正确姿势打开标签页和分类页

  1. 命令hexo n page tags,source文件夹中多出一个包含index.html的tags文件夹。这时候博客中的“标签就能打开了。
  2. 修改index.html文件。title改为标签,增加一行type: tags(这句不写标签页不会有标签)。
  3. 命令:hexo n page categories创建分类页。
  4. 修改categories里的index.html ,与之前类似。

05 主题样式的更改

在样式配置文件中修改Schemes项。

04 设置主题头像

主题配置文件中Avatar

07 更改作者和标题以及链接

08 启用侧边栏社交链接

  • 主题配置文件的Social项。

09 启用友情链接

主题配置文件中links_settings项。

10 新建一篇文章

  • hexo n 文章名 新建一篇文章
  • 在文章里添加标签和分类:
    tags:
     - xx
     - xx
        categories:
        xx
    

11 Markdown的使用

12 开启文章打赏功能

主题配置文件中reward项。

13 开启订阅公众号

主题配置文件中wechat Subscriber项。

14 设置头像是圆形可旋转

  • 打开文件..\themes\hexo-theme-next\source\css\_common\outline\sidebar\sidebar-author.sty,对其中的参数进行修改。
  • 在主题配置文件中修改:
    1
    2
    3
    4
    # If true, the avatar will be dispalyed in circle.
    rounded: true
    # If true, the avatar will be rotated with the cursor.
    rotated: true
    1
    2
    3
      第一个是让头像在圆中显示,第二个是鼠标移上去后旋转。

    #### 15 首页设置文章阅读全文
    excerpt:
    depth: 3 #按层来算,也就是按代码块来算
    excerpt_excludes: []
    more_excludes: []
    hideWholePostExcerpts: true
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10


    #### 背景黑色

    #### fork Github
    打开``..\themes\hexo-theme-next\layout``中的文件`_layout.swig`。
    在https://tholman.com/github-corners/ 中选一个样式,将代码复制到文件中的`</header>`前,并修改称自己的GitHub链接。

    #### 搜索功能
    按官方文档的local search来。http://theme-next.iissnan.com/third-party-services.html