miho
一. 主題簡介
MiHo 是一款單欄響應(yīng)式的Hexo主題;基于 Hexo 3.0+ 制作,兼容移動(dòng)端瀏覽;主題的代碼托管在GitHub上,
歡迎Star和Fork;如遇到問題或發(fā)表建議,可以提Issues,也可以在博客中留言給我,另外,喜歡的話不妨給個(gè) Star。
二. 安裝
2.1 安裝主題
$ git clone https://github.com/WongMinHo/hexo-theme-miho.git themes/miho
MiHo 主題需要Hexo 3.0或以上版本,請(qǐng)先升級(jí)。
2.2 更新
cd themes/miho
git pull
2.3 依賴安裝
如下依賴如果已經(jīng)安裝,請(qǐng)看配置介紹。
Json-content
生成站點(diǎn)文章靜態(tài)數(shù)據(jù),用于站內(nèi)搜索。
npm install hexo-generator-json-content --save
三. 站點(diǎn)配置
站點(diǎn)配置文件_config.yml
在hexo根目錄下。
3.1 啟用主題
`theme: miho`
3.2 網(wǎng)站基本配置
以下配置是站點(diǎn)的全局配置,更多配置,請(qǐng)查看
title: MinHow's Blog
subtitle: 網(wǎng)站副標(biāo)題
description: 專注 WEB 開發(fā)的技術(shù)博客
author: MinHow
language: 網(wǎng)站使用的語言
timezone: 網(wǎng)站時(shí)區(qū)
3.3 jsonContent配置
詳細(xì)的配置請(qǐng)查看hexo-generator-json-content
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: false
四. 主題配置
編輯主題配置文件,themes/miho/_config.yml
。
4.1 屬性
下面將介紹幾個(gè)比較重要的配置。
# hexo-theme-miho
# https://github.com/wongminho/hexo-theme-miho
# Favicon of your site | 網(wǎng)站icon
favicon: /favicon.ico
# Header
# Keywords of your site | 網(wǎng)站關(guān)鍵字
keywords: MinHow,MinHow's Blog
# Head headline | 頭部標(biāo)題
header_title: MinHow's Blog
# Head description | 頭部描述
header_description: 一個(gè)專注 WEB 開發(fā)的技術(shù)博客
# Link to your logo | logo地址
logo: images/logo.png
# Link to your banner_img | 首頁banner圖地址
banner_img: images/banner.jpg
# Menu setting | 菜單設(shè)置
# name: Font Awesome icon | Font Awesome 圖標(biāo)
# title: Home Title | 標(biāo)題
# url: //minhow.com Url, absolute or relative path | 鏈接,絕對(duì)或相對(duì)路徑
# target: true Whether to jump out | 是否跳出
menu:
home:
title: Home
url: /
target: false
archive:
title: Archives
url: /archives
target: false
user:
title: About
url: /
target: false
# Social setting, use to display social information | 社交設(shè)置,用來展示社交信息
# name: Font Awesome icon | Font Awesome 圖標(biāo)
# title: Home Icon title | 圖標(biāo)標(biāo)題
# url: //minhow.com Url, absolute or relative path | 鏈接,絕對(duì)或相對(duì)路徑
# target: true Whether to jump out | 是否跳出
social:
home:
title: MinHow
url: //minhow.com
target: true
github:
title: Github
url: //github.com/wongminho
target: true
weibo:
title: Weibo
url: //weibo.com/WongMinHo
target: true
twitter:
title: Twitter
url: //twitter.com/huangminhow
target: true
#qq:
#weixin:
#snapchat:
#telegram:
#mail:
#facebook:
#google:
#linkedin:
# Content
# Excerpt length | 摘錄長度
excerpt_length: 190
# Excerpt link | 摘錄鏈接
excerpt_link: more>>
# New window open link | 新窗口打開文章
open_new_link: false
# Article default cover picture,size:350*150 | 文章默認(rèn)封面圖,尺寸:350*150
cover_picture: images/banner.jpg
# Open background particles | 開啟背景粒子
open_bg_particle: true
# Open animation in homepage and head | 開啟主頁及頭部動(dòng)畫
open_animation: true
# Article
# Open toc | 是否開啟toc
toc: true
# Style customization | 樣式定制
style:
# Main color tone | 主色調(diào)
main_color: '#0cc'
# Comments | 評(píng)論
# 暢言,輸入appid和appkey
changyan_appid: false
changyan_appkey: false
# disqus
disqus: false
# Analytics | 分析
# 站長分析,輸入站點(diǎn)id
cnzz_analytics: false
# 百度分析,輸入key值
baidu_analytics: false
# google analytics | google分析
google_analytics: false
# Footer
# Access statistics | “不蒜子”訪問量統(tǒng)計(jì)
access_counter:
on: true
site_uv: 總訪客數(shù):
site_pv: 總訪問量:
# Copyright Information | 版權(quán)信息
copyright: 2017 MinHow
4.2 文章封面圖
文章默認(rèn)封面圖,尺寸:350*150,當(dāng)文章基本配置沒有cover_picture
時(shí)才顯示。
cover_picture: images/banner.jpg
4.3 開啟背景粒子
是否開啟背景粒子。
open_bg_particle: true
4.4 開啟主頁及頭部動(dòng)畫
是否開啟主頁及頭部動(dòng)畫。
open_animation: true
4.5 評(píng)論
支持暢言、disqus。
# 暢言
changyan_appid: false
changyan_appkey: false
# disqus
disqus: false
4.6 數(shù)據(jù)統(tǒng)計(jì)
支持站長、百度、google三種數(shù)據(jù)統(tǒng)計(jì),正確填寫配置信息即可。
# 站長分析,輸入站點(diǎn)id
cnzz_analytics: false
# 百度分析,輸入key值
baidu_analytics: false
# google分析
google_analytics: false
4.7 文章基本配置
---
title: Hello World
date: 2017-06-18
categories: First
author: MinHow
tags:
- First
- Second
cover_picture: /images/banner.jpg
---
MinHow-This is a summary
<!-- more -->
說明:
- 需要注意
tags
和摘要的寫法,不然首頁不能正確顯示標(biāo)簽和摘要; -
cover_picture
文章封面圖,不填默認(rèn)顯示_config.yml
配置的圖片。