hexo-theme-amane/README.md

219 lines
5.1 KiB
Markdown
Raw Normal View History

2015-03-20 10:01:52 +00:00
#Icarus
### The blog theme you may fall in love with, coming to Hexo. [Preview](http://ppoffice.github.io/hexo-theme-icarus/)
2015-03-20 10:33:17 +00:00
![](http://ppoffice.github.io/hexo-theme-icarus/gallery/preview.jpg "")
2015-03-20 10:01:52 +00:00
## Installation
### Install
``` bash
$ git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus
```
**Icarus requires Hexo 3.0 and above.**
### Enable
2015-05-28 01:36:20 +00:00
1. Rename `themes\icarus\_config.yml.example` to `themes\icarus\_config.yml`;
2. Copy `themes\icarus\_config.yml.site.example` to your hexo blog's root directory and rename it to `_config.yml`;
2015-10-28 10:33:40 +00:00
3. Copy `themes\icarus\_source\*` into your hexo blog's directory `source`;
4. Then modify `theme` setting in `_config.yml` to `icarus`.
2015-03-20 10:01:52 +00:00
### Update
``` bash
cd themes/icarus
git pull
```
## Configuration
### Theme configuration example
2015-05-28 01:36:20 +00:00
```r
2015-03-20 10:01:52 +00:00
# Header
menu:
Home: .
Archives: archives
Categories: categories # you need to add extra page to enable this, please see the config below.
Tags: tags # you need to add extra page to enable this, please see the config below.
About: about
2015-03-20 10:01:52 +00:00
# Content
excerpt_link: Read More
fancybox: true
# Sidebar
sidebar: right
widgets:
- recent_posts
- category
- tag
- tagcloud
- archive
2015-05-28 01:36:20 +00:00
thumbnail: true
2015-03-20 10:01:52 +00:00
# Contacts
contacts:
2015-05-28 01:36:20 +00:00
github: http://github.com/ppoffice/hexo-theme-icarus
2015-03-20 10:01:52 +00:00
twitter: '#'
facebook: '#'
dribbble: '#'
rss: atom.xml
2015-03-20 10:01:52 +00:00
# Links
links:
Hexo: http://hexo.io
# Miscellaneous
google_analytics:
favicon: favicon.png
2015-03-20 10:01:52 +00:00
twitter:
google_plus:
fb_admins:
fb_app_id:
```
2015-05-28 01:36:20 +00:00
- **excerpt_link** - Cooperate with `<!-- more -->` tag to show only part of the article in index pages.
2015-03-20 10:01:52 +00:00
- **fancybox** - Enable [Fancybox].
- **contacts** - Your social network links, RSS link, etc.
- **widgets** - Widgets displaying in sidebar.
2015-05-28 01:36:20 +00:00
- **thumbnail** - Whether to show post thumbnails in the sidebar and archive pages.
2015-03-20 10:01:52 +00:00
- **links** - Links displayed in the link widget.
- **google_analytics** - Google Analytics ID.
- **favicon** - Favicon path.
### Site configuration example
2015-05-28 01:36:20 +00:00
```r
2015-03-20 10:01:52 +00:00
# Site
title: Icarus
subtitle:
description: Hexo theme - Icarus
author: PPOffice
author_title: 'Web Developer & Designer'
avatar: css/images/avatar.png
location: 'Harbin, China'
language: en
timezone:
...
# Disqus
disqus_shortname:
```
- **author** - Your name.
- **author_title** - Title to your occupation.
- **avatar** - Your avatar image link.
- **location** - Where you live in.
- **disqus_shortname** - Your Disqus shortname.
2015-07-06 08:41:16 +00:00
### Post Thumbnail & Banner
You can add a thumbnail and a banner to each post by adding the following lines into your post source files' front-matter:
```r
title: Demo
date: 2015-01-01
...
# add those
thumbnail: http://example.com/thumbnail.jpg
banner: http://example.com/banner.jpg
```
### Custom Categories & Tags Pages
2015-05-28 01:36:20 +00:00
2015-12-07 14:59:56 +00:00
To enable custom categories page and tags page, just copy the `categories` folder and `tags` folder under your theme's `_source` foler into your site's `source` folder. Then edit theme's _config.yml and add the following lines:
2015-05-28 01:36:20 +00:00
```r
# Header
menu:
...
Categories: categories # -> add this line
Tags: tags # -> and add this line
...
```
2015-07-06 08:41:16 +00:00
### Languages
2015-03-20 10:01:52 +00:00
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`.
2015-05-28 01:36:20 +00:00
```r
2015-03-20 10:01:52 +00:00
language: zh-CN
```
2015-12-07 14:59:56 +00:00
## Swiftype
You can now enable **Swiftype** by editing blog's `_config.yml`.
``` yml
swiftype_install_key: XXX_XXXXXXXXXXXXXXXX
```
This `install key` can be found at your own engine's install page:
![](http://ppoffice.github.io/hexo-theme-icarus/gallery/swiftype_install.jpg "")
Finally, don't forget to save your swiftype configuration to complete the installation.
2015-03-20 10:01:52 +00:00
## Features
### Profile Sidebar
A nice place to show yourself. You can add your own information in your site's `_config.yml`
2015-03-20 10:33:17 +00:00
![](http://ppoffice.github.io/hexo-theme-icarus/gallery/profile.png "")
2015-03-20 10:01:52 +00:00
2015-05-28 01:36:20 +00:00
### Post Banner & Thumbnail
Thanks to [atika](https://github.com/atika), you can now add thumbnails and banners to every post to create better reading experience.
2015-03-20 10:01:52 +00:00
### Responsive Layout
Icarus knows on what screen size you are browsering the website, and reorganize the layout to fit your device.
2015-03-20 10:33:17 +00:00
![](http://ppoffice.github.io/hexo-theme-icarus/gallery/responsive.jpg "")
2015-03-20 10:01:52 +00:00
2015-05-28 01:36:20 +00:00
### Custom Categories & Tags Pages
Get your categories and tags listed in single pages to make your blog more methodic.
2015-03-20 10:01:52 +00:00
### Fancybox
Icarus uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos.
```
![img caption](img url)
```
### Sidebar
Icarus provides 6 built-in widgets:
- recent_posts
- category
- archives
- tag
- tagcloud
- links
All of them are enabled by default. You can edit them in `widget` setting.
## Development
### Requirements
- [Grunt] 0.4+
2015-05-28 01:37:50 +00:00
- Hexo 3.0+
2015-03-20 10:01:52 +00:00
### Grunt tasks
- **default** - Download [Fancybox] and [Font Awesome].
- **fontawesome** - Only download [Font Awesome].
- **fancybox** - Only download [Fancybox].
- **clean** - Clean temporarily files and downloaded files.
[Hexo]: http://zespia.tw/hexo/
[Fancybox]: http://fancyapps.com/fancybox/
[Font Awesome]: http://fontawesome.io/
2015-03-24 01:03:02 +00:00
[Grunt]: http://gruntjs.com/
2015-05-28 01:36:20 +00:00