Hexo is a simple, fast, and powerful Github Pages publishing tool that supports Markdown format. Hexo is a simple, fast and powerful Github Pages publishing tool that supports Markdown format. There are many great plug-ins and themes.

Configuration making

Create a warehouse

Create a repository for your blog posts. Note that the red part in the screenshot below must be your username, not your nickname — username. Github

Insert a picture description here

Generate SSK Keys(omitted if configured)

Run CMD ssh-keygen -t rsa -c “comment text (email address or name)”

Insert a picture description here

Add the locally generated ‘SSH’ key to ‘GitHub’

The id_rsa.pub file is stored in C: user/username /.ssh by default. Open the file with notepad and copy the contents of the file

Insert a picture description here

Click on your Github avatar, select Settings, then select SSH and GPG Keys, and finally click on the New SSH Key on the right, enter the title, paste the secret key, and click OK

Insert a picture description here


Insert a picture description here

Verify that SSH Keys are configured successfully

Run the CMD SSH -t [email protected] command. If the following information is displayed, the system succeeds

Insert a picture description here

Perfect github personal information

Run the following CMD command to collect statistics for Github operations, which may not be the user name or email address of Github

$git config –global user.name “wuyalan

$git config –global user.email “[email protected]

Hexo installation and configuration

Hexo website

Hexo making address

Install Hexo globally

npm install -g hexo-cli

Installing and deploying plug-ins

  • Create a new folder for storagehexoI’m going to create one hereMyBlogfolder
  • performCMDThe commandnpm initTo generate apackage.jsonfile
  • performCMDThe commandnpm install hexo-deployer-git --saveInstalling and deploying plug-ins
  • performCMDThe commandnpm installInstall dependencies

Initialize Hexio

Run the CMD command hexo init to generate the following files

Insert a picture description here

At this point, the basic Hexo is actually installed, and an example article is automatically generated to be previewed locally in the browser by executing the following command

Hexo G generates a web page, hexo G generates a web page every time it makes a change, hexo S starts a local server, implements a local preview, default port 4000

After executing the above command, Hexo will generate the relevant HTML file in the public folder and type localhost:4000 in the browser address bar to indicate the sample article

–>

Write a blog

Execute hexo new ‘my-first-blog’ in MyBlog directory

Insert a picture description here

A my-first-blog.md file is generated under MyBlog\source\_posts

Insert a picture description here

Open the my-first-blog.md file to edit the blog

---

titlepostName# Display name on the article page, usually in Chinese

date: 2013- 12-02 15: 3016:# The generated time of the article is generally unchanged, of course, can also be arbitrarily modified

categories: Default category # category

tags[tag1,tag2,tag3]# post tag, can be empty, multiple tags please use format, note: there is a space behind

description: Add an abstract paragraph, preferably 140 words or less, that will appear in themetathedescriptioninside

---



Here is the text

Zhang Zhang, born on June 26, 1984 in Xi 'an, Shaanxi Province, is a Chinese mainland actor and director. He graduated from the Acting Department of the Central Academy of Drama in 2006.

In 2004, she appeared in the TV series "Days of Youth" and began to emerge in the film and television circle[1]. In 2005, he starred in costume drama "Jinyi Wei". In 2007, he starred in the youth drama Struggle directed by Zhao Baogang;[2]In the same year, he starred in his first film, "We'll See." In 2008, he starred in the TV drama Dwelling Narrowness directed by Teng Huatao, playing the role of urban youth David Beckham born in the 1980s.[1]  [3]In 2009, he played autistic wang Dafu in the film Ocean Paradise; In the same year, he took part in the Anti-Japanese War drama Snow Leopard.[4]. In 2011, she starred in the TV series Naked Marriage Era, which was broadcasted on major TV channels.[5]In 2011,- 2012.Won the Beijing University Student Film Festival for two consecutive years[6]The Award for Most Popular Actor among college students. In 2012, he won the Best Actor Award at the 31st Hundred Flowers Award for Popular Film "Love is Not Blind".[8]In the same year, he founded his own Company, Beijing Junzhu Film and Television Culture Co., LTD., and directed his first film and television work, Little Dad. In February 2013, he starred in the film Journey to the West: Conquering the Demons, which was released nationwide.[9] 

On March 28, 2014, the sino-South Korean joint venture literary and romantic film I Love You most on the Road was released in China. On December 18, 2014, he played the role of Wu Qi in gone With the Bullets, an action comedy directed by Jiang Wen.[10]In 2016, he starred as Zhang Xueliang in the TV series Young Marshal[11]; Starring in the TV series razor's Edge[12]. On July 15, the director's film Yao Knows Ma Li was released.[13] 

In addition to her acting career, Wen also participated in public welfare and charity work. In 2010, he established the Tai Fu Autism Care Fund.

On September 16, 2017, he won the directorial Debut Award at the 31st Golden Rooster Film Awards for his work In Land To Know Ma Li[14]  。

On July 28, 2019, Wen Announced through his Microblog that he was divorcing his wife, Ma Yili[15] 

Copy the code

Generating HTML pages

After each modification of the blog, it is necessary to create an HTML page before it can be previewed or deployed locally

Local preview

Run the hexo s command in the MyBlog directory, open the browser, and type http://localhost:4000 in the address bar to preview locally

F:\ personal \MyBlog>hexo s

INFO  Start processing

INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

Copy the code

Deployment to making

Execute the command hexo d in the MyBlog directory

Insert a picture description here

See the effect

Open your browser and enter the github username.github. IO in the address box

Hexo common command

Hexo common command

Modify the website language

Open the site configuration file, _config.yml

# Site
title: Hexo
subtitle: ' '
description: ' '
keywords:
author: Selience
language: zh-CN
timezone: ' '
Copy the code

I changed the language to Chinese, some tutorials said to change it to zh-Hans, but I changed it to Arabic, and finally found that the language should be set in the languages folder under the theme folder you are currently using

Insert a picture description here

Add word count and read count at the bottom of the site

  • Installing a plug-in

npm install hexo-symbols-count-time --save

  • Modifying site Configurations

Yml in the directory you created in the first place. Turn on the statistics switch

symbols_count_time:
  symbols: true# Article word counttimetrue# Article reading timetotal_symbolstrue# Total word count of the sitetotal_timetrue# Total reading time on the siteexclude_codeblockfalse# Exclude code word countCopy the code
  • Modify the topic configuration file

Each folder in the themes folder is a theme. Open _config.yml in the themes folder and look for symbols_count_time

# Post wordcount display settings
# Dependencies: https://github.com/theme-next/hexo-symbols-count-time
symbols_count_time:
  separated_meta: true# Start another line (trueThe words are not in line with the date of publication.item_text_posttrueWhether to display text description before counting the number of articles on the home page (word count, reading time)item_text_totaltrueWhether to display text description (total number of words on the site, length of reading on the site) before the statistics at the bottom of the pageawl4                   # Average Word Length
  wpm275# Words Per Minutesuffix: mins.
Copy the code
  • Modifying text Description

If you want to modify the text such as home page, label, article number of words, length of reading, published in, etc., you can open the Themes folder under the current theme folder and the current language configuration file to modify

Insert a picture description here
  • At the top of the effect
! [insert picture description here] (HTTP: / / https://img-blog.csdnimg.cn/20200502205040160.png
  • At the bottom of the effect
Insert a picture description here

Add the number of site visits, visitors, articles read

I’m using next theme version 7.8.0, and busuanzi is already integrated internally. Just turn on busuanzi in theme configuration file. Open theme configuration file _config.yml, and look for busuanzi_count

# Show Views / Visitors of the website / page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi
busuanzi_count:
  enable: true# Enable Busuanzi statisticstotal_visitorstrue# Total visitorstotal_visitors_icon: fa fa-user
  total_viewstrue# Total page viewstotal_views_icon: fa fa-eye
  post_viewstrue# Article viewspost_views_icon: fa fa-eye
Copy the code

Results the following

Insert a picture description here

Change menu position

The two default menus of home and Archive are displayed at the top of the page. If you want to display them on the side, open the theme configuration file _config.yml and find the _config.yml(deconstruct) property.

# Schemes
# scheme: Muse
# scheme: Mist
# scheme: Pisces
scheme: Gemini
Copy the code
Insert a picture description here

See article 1 for a detailed tutorial

Refer to article 2 for a detailed tutorial

Refer to article 3– beautification

Refer to article 3- reading statistics per article

If you feel helpful, you can follow my public number"The front V"Thank you for your support!

Copy the code