Next 简介 Next 是 Hexo 最受欢迎的主题之一,而且在 Next 之下还分为4个scheme
。可以根据个人喜好来设置相应的scheme
。
官方文档:https://theme-next.js.org/ GitHub 地址:https://github.com/theme-next/hexo-theme-next
Next 安装 进入到博客根目录下,将主题项目下载到themes/
文件夹下:
1 2 > cd myBlog > git clone https://github.com/theme-next/hexo-theme-next themes/next
然后打开根目录下的_config.yml
配置文件,即网站配置文件,将其中的主题选项,参数改为next
即可。
Next 配置 这里有两种方式配置 Next 主题,一是更改/themes/next/
文件夹下的_config.yml
,即主题配置文件;二是在网站配置文件中添加一个 theme_config
属性,然后在该属性后面添加配置参数。
这里推荐使用第二种方式,因为网站配置文件中theme_config
下参数优先级高于主题配置文件,因此会覆盖主题配置文件,同时不用更改 Next 主题源码,当 Next 主题更新时也不需要再修改主题配置文件。
以我的博客为例,主题配置部分如下:
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 theme_config: footer: icon: name: fa fa-heart animated: true color: "#fc6423" powered: false since: 2021 copyright: Hush creative_commons: license: by-nc-sa sidebar: false post: true language: scheme: Gemini 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 avatar: url: /images/avator.jpg rounded: true rotated: true social: GitHub: https://github.com/Coley48 || fab fa-github E-Mail: mailto:coley48@qq.com || fa fa-envelope reward_settings: enable: false animation: false reward: codeblock: highlight_theme: normal copy_button: enable: true show_result: true style: mac beian: enable: false icp: 蜀ICP备 20003974 -1 号 back2top: enable: true sidebar: true scrollpercent: true reading_progress: enable: true position: top color: "#37c6c0" height: 3px github_banner: enable: true permalink: https://github.com/Coley48 title: Follow me on GitHub local_search: enable: true trigger: auto top_n_per_article: 1 unescape: false preload: false links:
更多配置详见:Next 使用文档 。
参考资料