Installation and setting of Next theme of Hexo blog

About Next

Hexo is a fast, concise and efficient blog framework with super fast generation speed, Markdown support, one click deployment and high scalability.

Next is a high-quality and elegant Hexo theme. This article introduces the installation and basic configuration of the next topic.

install

go to GitHub Releases Download the latest version of the compressed package and unzip it to the Hexo theme directory.

Or execute the installation through the following command

$ cd themes
$ git clone https://github.com/next-theme/hexo-theme-next

Name the topic directory next.

use

Enable theme

Under the root directory_ config. In the YML file, modify the theme configuration:

theme: next

Change language

Under the root directory_ config. In the YML file, modify the language configuration:

language: zh-CN

The language pack is in the languages directory under the topic directory.

Theme configuration

Cache support

NexT v6+ allows cached content generation. Set enable to true in the cache section of the NexT configuration file:

cache:
  enable: true

Shrink support

NexT allows you to scale down Hexo generation. Set the minify value to true in the NexT configuration file:

minify: true

Select Scheme

Scheme is a feature supported by NexT. By using scheme, NexT can provide different views. These schemes can use almost all configurations. Currently, NexT supports four schemes, namely:

  • Muse
  • Mist
  • Pisces
  • Gemini

Search scheme in the Next configuration file to find the location of the configuration, and then configure the scheme you want.

#scheme: Muse
#scheme: Mist
scheme: Pisces
#scheme: Gemini

Dark mode

You can enable Dark mode by setting darkmode to true in the NexT configuration file.

darkmode: true

Version settings

You can edit the creative in the NexT configuration file_ The values in the Commons section to configure it.

creative_commons:
  # Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | cc-zero
  license: by-nc-sa
  # Available values: big | small
  size: small
  sidebar: false
  post: true
  language: deed.zh

The sidebar attribute is set to true by default. If it is set to false, the version information will not be displayed.

Custom Logo

You can add the url of the image to custom by adding it to the NexT configuration file_ Logo to enable it.

custom_logo: /images/logo.jpg

images is the directory created under the source directory under the root directory of the site. If the directory does not exist, create it.

Custom avatar

You can enable it by setting the parameters in avatar in the Next configuration file.

avatar:
  # Replace the default image and set the url here.
  url: /images/avatar.jpg
  # If true, the avatar will be displayed in circle.
  rounded: false
  # If true, the avatar will be rotated with the cursor.
  rotated: false

Set navigation menu

By default, all menu items are commented out. You can enable it by setting the parameters in the menu.

menu:
  home: / || fa fa-home
  #about: /about/ || fa fa-user
  #tags: /tags/ || fa fa-tags
  #categories: /categories/ || fa fa-th
  archives: /archives/ || fa fa-archive
  #schedule: /schedule/ || fa fa-calendar
  #sitemap: /sitemap.xml || fa fa-sitemap
  #commonweal: /404/ || fa fa-heartbeat

In addition to the home page and archive, all custom pages under the menu section need to be created manually.

By default, NexT displays menu item icons without identification. You can edit the menu_settings to configure it.

menu_settings:
  icons: true
  badges: false

Set the value badges to true to display the count of Posts / Categories / Tags in the menu item.

So far, we have completed the installation and simple setup of the Next topic.

Tags: git Front-end github

Posted by satant on Thu, 02 Jun 2022 04:16:27 +0530