Hexo builds personal blogs SEO and site acceleration

Intro:   This paper builds the third part of the series of personal blog tutorials for hexo, the main content is SEO of the website and the acceleration of site visit, the first two articles are the basic arti

This paper builds the third part of the series of personal blog tutorials for hexo, the main content is SEO of the website and the acceleration of site visit, the first two articles are the basic article and the topic optimization article respectively. Because the website is based on the Next theme of hexo, it is recommended that readers configure according to the steps of the series of tutorials, but most of the configurations in this article can be used by all kinds of websites, so they still have great reference value.

Generally speaking, after your website is built, it is still impossible to find it in the major search engines, specifically by entering site: in the search engine to verify your domain name. So you need to submit your site to the major search engines:

Github forbids Baidu crawler, so the use of coding pages can be included by Baidu! (the blogger is configured synchronously for github/coding, so it is not verified)

After submitting your site to Baidu webmaster, there are generally three ways to verify the site: file verification, HTML tag verification and CNAME verification.

The general Web site is configured as shown above, while the hexo-based site is: 1 you need to download the authentication file first, and put the downloaded file in the site root / source file. 2 find the skip_render: changes in the site configuration file:

Skip_render:-README.md-CNAME-baidu_verify_XXXXXXXXXX.html # download file name 3 hexo g-d rerender deployment site 4 click Baidu webmaster file verification step 3 to confirm verification

1 copy the token of the mosaic section of the figure 2 to open the theme profile and search for site _ verification, changes:

# Google Webmaster tools verification setting # See: https://www.google.com/webmasters/ google_site_verification: baidu_site_verification: {your token} 3 just save the rerender deployment site

For sites where domain names are already bound, this is the easiest way!

The host record can be filled in the mosaic part of the (token), to save.

Recommend HTML tag verification, specifically with Baidu included part.

Install the sitemap site map generation plug-in for hexo:

$npm install hexo-generator-sitemap– save $npm install hexo-generator-baidu-sitemap– save adds the following code to the site configuration file:

After the successful configuration of sitemap: path: sitemap.xml baidusitemap: path: baidusitemap.xml, the former is suitable for submission to Google search engine and the latter is suitable for submitting Baidu search engine to sitemap.xml and baidusitemap.xml,. Baidu webmaster management-& gt; link submission:

Google webmaster management & gt; site map:

Install the active push plug-in:

$npm install hexo-baidu-url-submit– save adds the following to the site configuration file:

Baidu_url_submit: count: 3 # # for example, on behalf of the submission of the latest three links host: alvabill.ml # # registered domain name token: {your token} # # in Baidu webmaster platform please note that this is your secret key, please do not publish in the public warehouse! The address of the path: baidu_urls.txt # # text document, and the new link is saved in the token location in this text document:

Deploy:-type: baidu_url_submitter # # New addition-type: git repository: [email protected]:Alvabill/Alvabill.git branch: master sets the baidu_push in the theme configuration file to true, rerender deployment.

Open the\ themes\ next\ layout\ index.swig file and find the following code:

{% block title%}. {% endblock%} change it to:

{% block title%} {{theme.keywords}}-{{config.title}} {theme.description}} {% endblock%} modify article link hexo default article link is too long for SEO, to recommend changes to domain/postname form:

# permalink:: year/:month/:day/:title/ permalink:: title/

Enter the registration account of Qiniu official website and enter the management console, and create a new object storage space:

Upload and use pictures:

The pictures in the blog can be uploaded instantly to the bound seven Niuyun through other Markdown editing platforms, such as the bookkeeper, to accelerate the site and facilitate blog migration at the same time.

Replace the google font library in the topic with the domestic CDN library, and set the default font library in the site configuration file:

Related Passages:

Leave a Reply

Your email address will not be published. Required fields are marked *