之前我們已經(jīng)寫了怎么安裝設(shè)置Hexo和怎么部署到gitHub上,下面我們說一下怎么完善我們的blog,今天先介紹下怎么添加分類和標(biāo)簽頁面
創(chuàng)建Tag頁面
$ hexo new page "tags"
編輯剛新建的頁面,將頁面的類型設(shè)置為tags,主題將自動(dòng)為這個(gè)頁面顯示標(biāo)簽云。頁面內(nèi)容如下:
---
title: Tagcloud
date: 2017-06-22 12:39:04
type: "tags"
---
注意:如果有啟用多說 或者Disqus評(píng)論,默認(rèn)頁面也會(huì)帶有評(píng)論。需要關(guān)閉的話,請(qǐng)?zhí)砑幼侄?comments 并將值設(shè)置為 false,如:
---
title: Tagcloud
date: 2017-06-22 12:39:04
type: "tags"
comments: false
---
創(chuàng)建Categories頁面
創(chuàng)建分類頁和Tag頁是差不多的步驟。
$ hexo new page "categories"
---
title: categories
date: 2017-06-22 12:39:04
type: "categories"
comments: false
---
添加菜單
在菜單中添加鏈接。編輯 主題配置文件 ,添加 tags 到 menu 中,如下:
menu:
home: /
categories: /categories/
#about: /about/
archives: /archives/
tags: /tags/
#sitemap: /sitemap.xml
#commonweal: /404.html
歡迎訪問我的博客:http://atecher.com/,有更多精彩文章!