1. Website configuration

The _config.yml file in the root directory is the configuration file for the entire Hexo framework, which can be modified to customize the basic configuration of Hexo.

1.1. The website

parameter describe
title Site title
subtitle Website subtitle
description Website description
author The author
language Site language (default en)
timezone Site time zone (default to use the time zone on your computer)

Among them,descriptionMainly used for SEO, telling search engines a brief description of the site,It is recommended to include keywords for the site.



After modification, generate and deploy, then access to see:

1.2. The url

parameter describe
url The url
root Site root
permalink Permalink format for articles
permalink_defaults Default values for each part of the permalink

Catalogue of 1.3.

parameter describe
source_dir Resources folder
public_dir Public folder
tag_dir Label folder
archive_dir Archive folder
category_dir Classified folder
code_direr Inlcude code folder
i18n_dir Internationalization folder
skip_render Skips rendering of specified files

1.4. The deployment

Before the first deploymentThe type field must be set, this field indicates the deployment tool used, for examplegit, the subsequent REPO field indicates the warehouse address, and the branch field indicates the branch of the warehouse, as shown below:

1.5. Other

Leave other Settings as default.

2. Text Settings

Article Settings are for articles created using hexo new


“.

2.1. The Front – matter

Front-matterIs at the top of the article---A delimited area that specifies Settings for the file, such as the default articleHello WorldAs follows:



Front-matterThe predefined parameter list is as follows:

parameter describe
layout layout
title The title
date Set up the date
updated Updated date
comments Enable comments for articles
tags The label
categories classification
permalink Overlay article url

Note: There is a clear distinction between categories and labels in Hexo

  • Classification is sequential and hierarchical, that is, Foo, Bar is not equal to Bar, Foo;
  • Tags have no order or hierarchy;

2.2 Layout Layout

When creating new articles, Hexo creates files based on the corresponding files in the SCAFFolds folder. Hexo has three default layouts: Post, Page, and Draft, each of which corresponds to a different path, will be stored in the source/_posts folder just like any other custom layouts.

layout The path
post source/_posts
page source
draft source/_drafts

Post layout

usehexo new "title"Command to create a new article, the default post layout is used as follows: