🇨🇦
hexo-theme-redefine
BlogGithub
English
English
  • Project Description
  • Get Started
    • Installation
    • Update
    • Usage
  • Configuration
    • Create a theme config file
    • base_info
    • style
      • primary_color
      • avatar
      • favicon
      • article_img_align
      • left_side_width
      • content_max_width
      • nav_color
      • hover
      • first_screen
      • scroll
    • social_contact
    • menu
    • home_article
    • post
      • word_count
      • author_label
    • toc
    • copyright_info
    • website_count
    • local_search
    • comment
      • use
      • Waline
      • Gitalk
      • Twikoo
    • rss
    • lazyload
    • cdn
    • pjax
    • footer
  • Advanced
    • Create a page
    • Note modules
    • Article top
    • Mathematical formula
    • Friendship style
    • file comparison
    • Resource compression
Powered by GitBook
On this page
  1. Configuration

menu

Previoussocial_contactNexthome_article

Last updated 2 years ago

menu:
  Home: /
  Archives: /archives
  # Categories: /categories
  # Tags: /tags
  # Links: /links
  # About: /about
  # ...

Website header navigation menu, if you need to add a new navigation menu, fill in the above format, also need to create the corresponding Hexo page.

Screen Shot 2022-10-01 at 10.12.05 PM

The Hexo project does not have pages such as categories (categories), tags (tags), about (about), and links (friendship chains), which need to be created manually.

Take creating an "about" page as an example:

  1. Execute the command hexo new page about in the root directory of the Hexo project to generate the about folder in the source directory.

    $ hexo new page about
  2. Add About: /about under the menu configuration item in the Redefine theme configuration file _config.redefine.yml.

    Among them, the front About is the name displayed on the home page, and the latter /about is the page path

    menu:
      Home: /
      Archives: /archives
      # Categories: /categories
      # Tags: /tags
      # Links: /links
      About: /about
  3. Open the /source/about/index.md file under the Hexo project and fill in the content of the about page. Supports Markdown and HTML formats;

    The reference is as follows:

    ---
    title: about
    date: 2020-03-19 14:59:53
    comment: true
    ---
    
    # About me
    
    I am **homo**
    
    1145141919810

    ::: tip comment: true means that the page enables the comment function. :::

    ::: danger Do not modify the title attribute that is automatically generated when the page is created! Do not delete it! For example: title: about cannot be modified! :::

If you want to jump to a third-party website when you click the menu in the navigation bar, you only need to fill in the value of the configuration item as the URL of the third-party website. For example: configure to go to Google in the header navigation bar

menu:
  Google: https://www.google.com/