This theme is inspired by the
Future Imperfect
responsive HTML5 template.
The most beautiful theme for Hexo, flat and delicate, created and maintained by AOTU Labs.
$ git clone https://github.com/o2team/hexo-theme-o2.git themes/o2
Hueman requires Hexo 3.0.0 and above.
Modify theme
setting in _config.yml
to o2
.
cd themes/o2
git pull
Display an aphoristic sentence randomly at index.html
.
In o2 theme's configration:
daily_word: true
Place your words into the
_data
folder of your hexo site.
See the example aphoristic sentence json data
In your hexo site's configuration (not the theme's configuration).
# disqus
disqus_shortname: "your disqus shortname"
Duoshuo
is a comment system specially for Chinese.
In o2 theme's configuration:
# Make duoshuo show UA
# user_id must NOT be null when admin_enable is true!
# you can visit http://dev.duoshuo.com get duoshuo user id.
duoshuo:
shortname: aotu
ua_enable: true
admin_enable: false
user_id: 0
#admin_nickname: ROOT
In your hexo site's configuration,
google_analytics: "your GA ID"
For Chinese, in your hexo site's configuration,
baidu_analytics: "your BA ID"
busuanzi
is a lighweight analytics plugin, use it to display pv
and uv
on every post.
In o2 theme's configuration,
busuanzi: true
In o2 theme's configuration,
# Code Highlight theme
# Available value:
# normal | night | eighties | blue | bright
# https://github.com/chriskempson/tomorrow-theme
highlight_theme: normal
In o2 theme's configuration, you can specify your own logo picture.
logo:
url: img/logo-square-120.png
In o2 theme's configuration,
post:
cover: post-default.png
img_dir: img/post/
O2 uses Fancybox to showcase your photos in your posts.
![img caption](img url)
pimg
means post image
, it's a custom tag for you inserting your post's content image quickly.
To use 'pimg', you should put your images into the folder defined in post.img_dir
.
{% pimg imageName [alt text] [JSONImageAttibutes] %}
Note: Don't use space charaters in the alt text
field, replace any space charaters with %20
if you have to.
For example,
{% pimg post-aotu.jpg "An%20Sentence%20WithSpace" '{"title":"hello","class":"test_img"}' %}
tag_cfg
let your access to your site's configuration in your posts.
For example, we can insert the config's description field into a post.
{% tag_cfg description %}
Place your menu data into the _data
folder of your hexo site.
O2 uses the 'hexo-generator-lunr' plugin to implement client-side full text search.
In your hexo site's configuration,
# lunr
lunr:
field: all
path: assets/lunr/
For more details about hexo-generator-lunr
English and Simplified Chinese are the default languages of the theme. You can add translations in the languages
folder and change the default language in blog's _config.yml
.
language: zh-CN
- Hexo 3.0+