Optimization hexo NexT link title theme Home

In the default setting, the article links will change, it is not conducive to the search engines, is not conducive to sharing

Change the file index.swig

The file path is your-hexo-sitethemesnextlayout, code below

1
{% block title %} {{ config.title }} {% endblock %}

Change

1
{% block title %} {{ config.title }} - {{ theme.description }} {% endblock %}

This time your home title would be more in line with the name of the site - the site describes this habit.
Advanced, do seo optimization, the key words in the title are also displayed in the Title, can be changed

1
{% block title %} {{ theme.keywords }} - {{ config.title }} - {{ theme.description }} {% endblock %}

Note: Do not keyword stuff, the whole title is generally no more than 80 characters, you can query by checking the seo chinaz.

Install this plugin

After you install this plug-in, do not change the file name in the article hexo s mode, otherwise the article will become empty large column  optimization hexo NexT theme home title link white.
installation:

1
npm install hexo-abbrlink --save

Permalink lookup code in the site configuration file, change it to:

1
permalink: posts/:abbrlink/  # “posts/”

Replaceable
add the following code site configuration file:

1
2
3
4
# abbrlink config
abbrlink:
alg: crc32 # 算法:crc16(default) and crc32
rep: hex # 进制:dec(default) and hex

Selectable modes:

1
2
3
4
crc16 & hex
crc16 & dec
crc32 & hex
crc32 & dec

Guess you like

Origin www.cnblogs.com/lijianming180/p/12037946.html