Simple configuration of Hexo NexT theme and detailed explanation of article publishing

Click "Blue WeChat Name" under the title to quickly follow

In the last article, I wrote about the construction of a blog, using HEXO+Github. Today, I will talk about changing the theme of my blog and publish an article of my own. First, let the blog take shape.

NexT theme official website address:

http://theme-next.iissnan.com/

1. Add NexT theme

1. Download the theme

Here I would like to say that it is recommended to download the latest version of the clone. I found a lot of problems with the stable version, so you can download the cloned version directly with the command.

 

2. Then launch the theme directly, the same mode as all Hexo themes enable. When the clone/download is complete, open the site configuration file , find the theme field, and change its value to next.

theme: next

3. After inputting, verify the theme, first start the Hexo local site, and turn on the debug mode (that is, add --debug), the whole command is hexo s --debug . During the service startup process, pay attention to observe whether there is any abnormal information in the command line output. If you encounter problems, these information will help others to better locate the error. When prompted in the command line output:

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

When the above display text appears, it means that the installation has been successful, and the default theme is Scheme - Muse.

At this point, use a browser to visit http://localhost:4000 to check whether the site is running correctly. The screen is as follows:

 

Scheme is a feature provided by NexT, with the help of Scheme, NexT provides you with many different appearances. At the same time, almost all configurations can be shared between Schemes. Currently NexT supports three Schemes, they are:

  • Muse - Default Scheme, this is the original version of NexT, with black and white as the main theme, a lot of white space

  • Mist - A compact version of Muse with an uncluttered one-column look

  • Pisces - Double-column Scheme, as fresh as a jasper

Scheme switching is done by changing the theme configuration file, searching for the scheme keyword. You will see a configuration with three lines of scheme, just remove the comment # in front of the scheme you need to enable.

2. Other settings

1. Set the language

 

Edit the site configuration file and set the language to your desired language. It is recommended to explicitly set the language you need, such as Simplified Chinese. The configuration is as follows:

language: zh-Hans

It should be noted that the format of the configuration file is YML, and the encoding format should be set to UTF-8, otherwise the title will display garbled characters.

2. Set author nickname

Edit the site configuration file and set author to your nickname.

3. Site Description

Edit the site configuration file and set the description field to your site description. The site description can be your favorite sentence signature :)

 

4. Set avatar

Edit the theme configuration file , modify the field avatar, and set the value to the link address of the avatar. The link address of the avatar can be:

 

5. Other

Go directly to NextT's official website.

Finally execute the command:

hexo clean && hexo g && hexo d

You can go directly to your website.

3. Article Publishing

1. Hexo supports markdown.

Choose a markdown editor, write articles, markdownPad,

Address: http://www.markdownpad.com/download.html After writing, save it as an md file. You can also use some online markdown editors, such as csdn, Jianshu, etc.

2. Put the md file in the source\_posts directory under the location of your hexo website. There are many md files stored in this directory, and each file corresponds to a blog.

 

 

3. Open git bash, reach the directory of the hexo website, use the hexo generete command to generate static files, hexo server, and then go to http://localhost:4000/ to preview the website effect, and finally synchronize the files in the public directory to github or execute:

hexo clean && hexo g && hexo d

Today's summary is here, and the renderings after today's summary are attached:

 

 

Recommended reading

 

 

Where are you from Beijing, Shanghai, Guangzhou and Shenzhen?

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326034562&siteId=291194637