mirror of https://github.com/IoTcat/blog.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
2.2 KiB
112 lines
2.2 KiB
# Landscape |
|
|
|
A brand new default theme for [Hexo]. |
|
|
|
- [Preview](http://hexo.io/hexo-theme-landscape/) |
|
|
|
## Installation |
|
|
|
### Install |
|
|
|
``` bash |
|
$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape |
|
``` |
|
|
|
**Landscape requires Hexo 2.4 and above.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required. |
|
|
|
### Enable |
|
|
|
Modify `theme` setting in `_config.yml` to `landscape`. |
|
|
|
### Update |
|
|
|
``` bash |
|
cd themes/landscape |
|
git pull |
|
``` |
|
|
|
## Configuration |
|
|
|
``` yml |
|
# Header |
|
menu: |
|
Home: / |
|
Archives: /archives |
|
rss: /atom.xml |
|
|
|
# Content |
|
excerpt_link: Read More |
|
fancybox: true |
|
|
|
# Sidebar |
|
sidebar: right |
|
widgets: |
|
- category |
|
- tag |
|
- tagcloud |
|
- archives |
|
- recent_posts |
|
|
|
# Miscellaneous |
|
google_analytics: |
|
favicon: /favicon.png |
|
twitter: |
|
google_plus: |
|
``` |
|
|
|
- **menu** - Navigation menu |
|
- **rss** - RSS link |
|
- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link. |
|
- **fancybox** - Enable [Fancybox] |
|
- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`. |
|
- **widgets** - Widgets displaying in sidebar |
|
- **google_analytics** - Google Analytics ID |
|
- **favicon** - Favicon path |
|
- **twitter** - Twiiter ID |
|
- **google_plus** - Google+ ID |
|
|
|
## Features |
|
|
|
### Fancybox |
|
|
|
Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos. |
|
|
|
``` |
|
![img caption](img url) |
|
|
|
{% fancybox img_url [img_thumbnail] [img_caption] %} |
|
``` |
|
|
|
### Sidebar |
|
|
|
You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting. |
|
|
|
Landscape provides 5 built-in widgets: |
|
|
|
- category |
|
- tag |
|
- tagcloud |
|
- archives |
|
- recent_posts |
|
|
|
All of them are enabled by default. You can edit them in `widget` setting. |
|
|
|
## Development |
|
|
|
### Requirements |
|
|
|
- [Grunt] 0.4+ |
|
- Hexo 2.4+ |
|
|
|
### 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]: https://hexo.io/ |
|
[Fancybox]: http://fancyapps.com/fancybox/ |
|
[Font Awesome]: http://fontawesome.io/ |
|
[Grunt]: http://gruntjs.com/ |
|
[hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed
|
|
|