一个基于cactus-light简单修改、简洁适用的 Hexo 主题,适用于个人博客。
- Version : 2.0
- Compatibility : Hexo 3 or later
- 自适应
- 支持Disqus、友言
- 谷歌 analytics
- 代码高亮
- 阅读量统计
- Projects list
-
In the
root
directory:$ git clone https://github.com/Windysec/white-light.git themes/white-light $ npm install hexo-pagination --save
-
Change the
theme
property in theconfig.yml
file.# theme: landscape theme: white-light
-
Run:
hexo generate
andhexo server
在主题的 _config.yml
中设置导航菜单:
nav:
Home: /
About: /about/
Writing: /archives/
Links: /links/
Projects: http://github.com/gabithume
LINK_NAME: URL
关于文章首页,有两项设置
- 默认展示五篇最近的文章
customize:
show_all_posts: false
post_count: 5
- 展示所有文章
customize:
show_all_posts: true
创建一个项目文件 source/_data/projects.json
.
[
{
"name":"Hexo",
"url":"https://hexo.io/",
"desc":"A fast, simple & powerful blog framework"
},
{
"name":"Font Awesome",
"url":"http://fontawesome.io/",
"desc":"The iconic font and CSS toolkit"
}
]
在主题中增加社交链接,修改_config.yml
:
customize:
social_links:
github: your-github-url
twitter: your-twitter-url
NAME: your-NAME-url
where NAME
is the name of a Font Awesome icon.
Set the rss
field in the theme's _config.yml
to one of the following values:
rss: false
will totally disable rss (default).rss: atom.xml
sets a specific feed link.rss:
leave empty to use the hexo-generator-feed plugin.
首先在disqus中为你的站点创建一个账号: https://disqus.com/admin/create/.
修改 _config.yml
:
plugins:
disqus_shortname: SITENAME
SITENAME
是你在disqus中设置的站点名.
修改 _config.yml
:
changyan_appid: appid
changyan_appkey: appkey
添加Leancloud统计阅读次数
修改 _config.yml
:
leancloud_visitors:
enable: true
app_id:
app_key:
Pick one of the available colorschemes and add it to the theme's _config.yml
:
customize:
highlight: COLORSCHEME_NAME
MIT