I. Overview
The old version has too many blogs and the compilation time is too long, and there may be JavaScript heap out of memory
problems during compilation due to too many files , so this time we upgrade to the latest stable version (V7.8.0)
-
cole theme
-
Install npm depends on the latest detection tools
-
Modify the _config.yml under the project (compared to v7.1.1)
-
Modify the theme under themes/next
<!--more-->
Two cole theme
-
Open the hexo-theme-next website to view the instruction guide
-
Open the blog directory and execute the git clone command
git clone https://github.com/theme-next/hexo-theme-next themes/next
Three install npm depends on the latest detection tools
-
Install dependent tools
npm install -g npm-check-updates
-
View the latest version
ncu
-
Execute ncu -u to upgrade, then delete the existing node-modules, execute npm install to install new dependencies (due to the bug in hexo-renderer-marked version 3.0.0, use 2.0.0)
ncu -u
Four modify the _config.yml under the project (compared with v7.1.1)
4.1 permalink_defaults
#add v7.8.0
permalink_defaults:
pretty_urls:
trailing_index: true
trailing_html: true
4.2 external_link
#add v7.8.0
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
4.3 hightlight、prismjs
# add v7.8.0
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ''
4.4 meta_generator
meta_generator: true
4.5 updated_option
updated_option: 'mtime'
4.6 The default effect after upgrading from v7.1.1 to v7.8.0
Five modify the theme under themes/next
5.1 _config.yml
5.1.1 Modify footer
footer:
since: 2017
icon:
name: heart
animated: false
color: "#ff0000"
copyright: pgzxc
powered: false
5.1.2 Modify beian
beian:
enable: true
icp: 京ICP备xxx
gongan_id:
gongan_num:
gongan_icon_url:
5.1.3 Schemes
scheme: Gemini
5.1.4 menu
menu:
home: / || fa fa-home
archives: /archives/ || fa fa-archive
categories: /categories/ || fa fa-th
tags: /tags/ || fa fa-tags
comments: /comments/ || fa fa-comments
menu_settings:
icons: true
badges: true #modify 2020-08-12
5.1.5 avatar
avatar:
url: /images/avatar.jpg
rounded: true
rotated: false
5.1.6 social
social:
GitHub: https://github.com/PGzxc || fab fa-github
CSDN: http://blog.csdn.net/calvin_zhou || fab fa-book
微博: http://weibo.com/5582039920 || fab fa-weibo
简书: http://www.jianshu.com/u/c5cdcb4dc52b || fab fa-heartbeat
social_icons:
enable: true
icons_only: false
transition: false
5.1.7 link
links_settings:
icon: fa fa-link
title: 友情链接
# Available values: block | inline
layout: inline
links:
鸿洋: https://wanandroid.com/
5.1.8 comment
livere_uid: MTAyMC8zMjQ1OC85Msxxx
5.1.9 leancloud_visitors
leancloud_visitors:
enable: false
app_id: xoStNXjq2xNoDRjTltoOztdq-gzGzoHsz
app_key: 6g89MPFNvTH2YHnKMAK1n1V8
5.1.10 busuanzi_count
busuanzi_count:
enable: true
total_visitors: true
total_visitors_icon: fa fa-user
total_views: true
total_views_icon: fa fa-eye
post_views: true
post_views_icon: fa fa-eye
5.1.11 local_search
local_search:
enable: true
trigger: auto
top_n_per_article: 1
unescape: false
preload: false
5.2 language / zh-CN.yml
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
comments: 留言板 #add 2020-08-12
schedule: 日程表
sitemap: 站点地图
commonweal: 公益 404