The problem

When using the Next theme of the Hexo blogging framework, the default home page is a summary of several blogs. To modify the content of the main page (i.e. the home page) (for example, to give an introduction to the site, etc.), a custom configuration is required.

steps

  1. In the root directorysourceDirectory, create a new oneindex.mdThe document

    In the source directory of the root directory, create a new document named index.md. The index.md document in the source directory is our custom home page. Any changes made in the document are reflected in the custom home page.

  2. Modify the directory under the root_config.ymlOf the fileindex_generatoritem

    Open the _config.yml file in the root directory and change the value of the path entry under the index_generator entry to an invalid value. For example: I changed this entry to default-index. The purpose is to make the default home page of the Hexo framework point to an invalid value.

  3. Modify the configuration file for the Next theme (themes/next/_config.ymlFile)HomeThe link to which the menu points

    Open the themes/next/directory _config. Yml file, amend the value of the home under the menu item is / | | fa fa – home. Enables clicking on the Home menu on the page to return to the custom Home page.

explain

The newly created index.md document in the source directory will be used as the custom home page, so we need to disable the system default home page. To mask the system’s default home page, modify the index_generator entry in the _config.yml configuration file.

After the injection

The basic syntax for Markdown, the setup and deployment of a Hexo blog, the download and use of the Next topic, and the basic commands for creating new Hexo posts are the first steps to this configuration.

Author: Fa Hua Temple middle class small fart children @Zhihu

Home page of Zhihu: Fa Hua Temple middle class kids – Zhihu

Article: Hexo-next Theme Custom Home Page Configuration Method – Zhihu

When using the Next theme of the Hexo blogging framework, the default home page is a summary of several blogs. To modify the content of the main page (i.e. the home page) (e.g. to give an introduction to the site, etc.), you need to do a custom configuration…

StupidPanther /
Fa Hua Temple middle class little boy@ zhihu /
Fa Hua Temple middle class little boy@Blog Garden /
StupidPanther@sifou is the same author, others do not reprint