This is the 13th day of my participation in the August More Text Challenge

The Next theme allows articles to be categorized, tagged, and has a dedicated page for management and retrieval. The newly installed Next theme does not have about, Tags, and Categories pages. By default, it only has Archives. This article describes how to add these pages.

Open menu button

Turn on the corresponding button in the theme profile (remove the # before the line)

# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# Menu Settings
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive.
# Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon.
# When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives).
# External url should start with http:// or https://
menu:
  home: / || home
  about: /about/ || user
  tags: /tags/ || tags
  categories: /categories/ || th
  archives: /archives/ || archive
  #schedule: /schedule/ || calendar
  #sitemap: /sitemap.xml || sitemap
  #commonweal: /404/ || heartbeat
Copy the code

At this point, the page menu has changed a bit, but the button link has no corresponding page

Add a page

Add tags

Enter a command in the terminal of the Hexo directory to create a new article. Layout is set to Page and the article name is tags

hexo new page tags
Copy the code

/hexo_root/source/tags/ index.md file now appears in /hexo_root/source/tags/ folder

Date: 2020-02-28 13:01:59 Type: "Tags"Copy the code

The tags page is now ready to open

Add categories

Enter a command in the terminal of the hexo directory to create a new article, set layout to Page, and name the article categories

hexo new page categories
Copy the code

In the /hexo_root/source/categories/ folder, open the index.md file and change the front-matter content

Date: 2020-02-28 13:03:19 Type: "Categories"Copy the code

The Categories page is now ready to open

Add the about

Enter the command at the terminal of the hexo directory to create a new article with Layout set to Page and the name of the article to About

hexo new page about
Copy the code

Now the index.md file is in the /hexo_root/source/about/ folder. Open and change the front-matter content

Date: 2020-02-28 13:07:35 Type: "About"Copy the code

You can also add site descriptions to the file

The About page is now ready to open

Set the post category and label

Update /hexo_root/source/_posts/hello-world.md to add labels and categories to front-matter

title: Hello World
tags: [tag1,tag2]
categories: [cate,sub_cate,sub_sub_cate]
Copy the code

or

title: Hello World
tags: 
- tag1
- tag2
categories: 
- cate
- sub_cate
- sub_sub_cate
Copy the code

The home page sidebar status changes

Label page (the font will be larger if the number of label contents is larger)

Multiple parallel labels can be set for a single article

Category pages

Category labels are not juxtaposed, and the installation sequence is set to the level

Closing comments

Comments may be enabled on future sites. If you do not want to enable comments on the above page, you can add them to front-matter in the index.md page

comments: false
Copy the code