天天看點

Git個人部落格hexo設定關于、标簽、分類、歸檔、時間線

1、添加 關于頁面

使用:hexo new page "about" 建立一個 關于我 頁面。

主題的 _config.yml 檔案中的 menu 中進行比對

不同主題 _config. yml檔案有差別

menu:
  home: /      //首頁
  categories: /categories //分類
  archives: /archives   //歸檔
  tags: /tags   //标簽
  about: /about   //關于                  (添加此行即可)
或    
menu:
  - page: home
    directory: .      //首頁
    icon: fa-home
  - page: archive
    directory: archives/    //歸檔
    icon: fa-archive
  - page: about
    directory: about/    //關于
    icon: fa-user
  - page: rss
    directory: atom.xml    //rss訂閱
    icon: fa-rss
           

編輯 about 關于頁面 md檔案 部署就能看到

2、添加 标簽頁面

使用:

hexo new page tags

建立一個 标簽 頁面。

主題的

_config.yml

檔案中的

menu

中進行比對

menu:
  home: /      //首頁
  categories: /categories //分類
  archives: /archives   //歸檔
  tags: /tags   //标簽                  (添加此行即可)
  about: /about   //關于
           

底下代碼是一篇包含

标簽

文章的例子:

title: 标簽測試
tags:
  - Testing                   (這個就是文章的标簽了)
  - Another Tag               (這個就是文章的标簽了)
---
           

3、添加 分類頁面

hexo new page categories

建立一個 分類 頁面。

_config.yml

menu

menu:
  home: /      //首頁
  categories: /categories //分類        (添加此行即可)
  archives: /archives   //歸檔
  tags: /tags   //标簽                  
  about: /about   //關于
           

分類

title: 分類測試
categories:
- hexo                       (這個就是文章的分類了)
---
           

4、添加 歸檔頁面

hexo new page archives

建立一個 歸檔 頁面。

_config.yml

menu

menu:
  home: /      //首頁
  categories: /categories //分類        
  archives: /archives   //歸檔             (添加此行即可)
  tags: /tags   //标簽                  
  about: /about   //關于
           

5、添加 時間線頁面

hexo new page timeline

_config.yml

menu

menu:
  home: /      //首頁
  categories: /categories //分類        
  archives: /archives   //歸檔             (添加此行即可)
  tags: /tags   //标簽    
-page: history   (時間線)
     directory: timeline/
      icon: fa-history              
  about: /about   //關于
           
  • 修改timeline對應的清單
timeline:
  - num: 1
    word: 2018/08/16-Start 
  - num: 2
    word: writing
  - num: 3
    word: More
           

6、添加 自定義頁面

hexo new page "guestbook"

建立一個 自定義 頁面。

_config.yml

menu

menu:
  home: /      //首頁
  categories: /categories //分類        
  archives: /archives   //歸檔   
  tags: /tags   //标簽                  
  about: /about   //關于
  guestbook: /guestbook    //自定義             (添加此行即可)