/ guide  

Hexo-Theme-Casper

A new Ghost’s Casper theme port to Hexo.

DEMO here

My Blog zhih.me

This is a simple and beautiful hexo theme.

When I was searching beautiful hexo themes, I saw the old version of Casper port to Hexo, but the latest not. So I decided that I would port it.

中文版安装说明

Table of Contents generated with DocToc

hexo-theme-casper.jpg

Features

  • Posts cover image
  • Posts feature image
  • Customized navigation menu
  • Customized favicon, logo, header image, author image
  • Social links ( now support FB, TT、github、bilibili、YouTube、weibo)
  • 3 widgets ( I think no need more )
  • Tag, Category, TOC
  • Pagination
  • Syntax Highlighting
  • Responsive Web Design
  • Lazy load
  • Local search
  • Valine comment
  • Chrome Nav Color
  • Baidu Push Google Analytics
  • Service Worker

Installation

Install

1
git clone https://github.com/xzhih/hexo-theme-casper.git themes/hexo-casper

Enable

Modify theme in _config.yml to hexo-casper .

Update

You’d better backup old file first.

1
2
cd themes/casper 
git pull

Front-matter

Add to scaffolds/post.md,

1
2
3
4
cover_img:     # show in home page, the post card header
feature_img: # show in post page, content header
description:
keywords:

Valine comment

https://valine.js.org

PS: Add about page

1
hexo new page about

Configuration

Edit themes/hexo-casper/_config.yml and set up what you want to show

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Config
rss: # link
favicon: https://i.loli.net/2017/11/26/5a19c0b50432e.png
blog_logo:
header_image: https://i.loli.net/2017/11/26/5a19c56faa29f.jpg
bio: This is a demo
post_toc: true

# Keywords
keywords: hexo, casper, ghost, theme

# Menu
menu:
ABOUT: /about
ARCHIVES: /archives
# you can add here

# author
author_image: # link
author_bio:
author_location:

# Social Links
social:
weibo: https://weibo.com/xzhih
github: https://github.com/xzhih
twitter: https://twitter.com
facebook: https://facebook
telegram:
bilibili:
youtube:
# You only can use that I have added, I will keep adding

# Footer Links
footer_text:
# title: link
# 粤ICP备xxxxxxx号-x: http://www.miitbeian.gov.cn
# 粤公网安备xxxxxxx号: http://www.beian.gov.cn

# Widget
widgets:
recent_posts: true
category: true
tagcloud: true
# This is a simple theme, I think 3 is enough.

# Gallery
# https://github.com/sachinchoolur/lightgallery.js
lightgallery: true

# LazyLoad
# home page has enabled, this value is to post page
# https://github.com/dinbror/blazy
lazyload: true

# Local Search
local_search: true

# Comment
# https://valine.js.org
comment: false
valine:
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
appId: # your leancloud application appid
appKey: # your leancloud application appkey
placeholder: Just go go # comment box placeholder
pageSize: 10 # pagination size
avatar: mm # gravatar style

# PWA
# you need create a manifest.json file in hexo's source folder
manifest: false
service_workers: false

navColor: '3c484e'

# Baidu Push
baidu: false

# Google Analytics
googleAnalytics: false
GA_TRACKING_ID: UA-XXXXXXXXXX-1

https://github.com/wzpan/hexo-generator-search

https://github.com/SuperKieran/hexo-generator-search-zip