';
+}, true);
\ No newline at end of file
diff --git a/source/docs/cli.md b/source/docs/cli.md
deleted file mode 100644
index c00af47c08..0000000000
--- a/source/docs/cli.md
+++ /dev/null
@@ -1,76 +0,0 @@
----
-layout: page
-title: Command-line Interface (CLI)
-date: 2012-11-01 18:13:30
----
-
-Display current version of Hexo
-
-``` plain
-hexo version
-```
-
-Setup website. If `folder` is not defined, Hexo will setup website at current directory.
-
-``` plain
-hexo init [folder]
-```
-
-Create a new article
-
-``` plain
-hexo new [layout]
-```
-
-Generate static files.
-
-- -d/--deploy: Deploy automatically after generate
-- -w/--watch: Watch file changes
-
-``` plain
-hexo generate
-```
-
-Start server. Press `Ctrl+C` to stop it.
-
-- -p/--port: Port setting
-- -s/--static: Only serve static files
-
-``` plain
-hexo server
-```
-
-Display configuration of the site
-
-``` plain
-hexo config
-```
-
-Deploy
-
-- --setup: Setup without deployment
-- --generate: Generate before deployment
-
-``` plain
-hexo deploy
-```
-
-Render
-
-- -o/--output: Output path
-
-``` plain
-hexo render
-```
-
-Safe mode. Plugins will not be loaded in this mode.
-
-``` plain
-hexo --safe
-```
-
-Debug mode.
-
-``` plain
-hexo --debug
-```
\ No newline at end of file
diff --git a/source/docs/collection.md b/source/docs/collection.md
deleted file mode 100644
index d76866d05f..0000000000
--- a/source/docs/collection.md
+++ /dev/null
@@ -1,121 +0,0 @@
----
-layout: page
-title: Collection
-date: 2012-11-01 18:13:30
----
-
-Since 1.0, Hexo records all data with [Warehouse][1]. [Warehouse][1] inherits some parts of old features and adds searching, improves performance, more powerful than before.
-
-
-## Model
-
-Model is a collection of data.
-
-#### get(id1[, id2, ..., idN])
-
-Gets data of specific id. Returns an array when multiple id.
-
-#### each(iterator)
-
-Iterates over all items in the model, executing `iterator(data, id)`.
-
-#### toArray()
-
-Transforms the model into an array.
-
-#### count()
-
-Returns the number of elements. Equals to `length`.
-
-#### insert(data, callback)
-
-Inserts data to the model. `data` can be an object or an array. Once the insertion is complete, executing `callback(data, id)`.
-
-#### update([id, ]data)
-
-Updates data. `id` can be a number or an array. If `id` is undefined, updates all items in the model.
-
-Operators:
-
-- **$push** - Appends elements to an array
-- **$pull** - Remove elements from an array
-- **$shift** - Removed the first elements from an array
-- **$pop** - Removed the last elements from an array
-- **$addToSet** - Appends elements to an array (only if the elements not exists)
-- **$inc** - Increase number
-- **$dec** - Decrease number
-
-#### replace([id, ]data)
-
-Replaces data. `id` can be a number or an array. If `id` is undefined, replaces all items in the model.
-
-#### remove([id1, id2, ..., idN])
-
-Removes data. If `id` is undefined, removes all items in the model.
-
-#### destroy()
-
-Removes all data of the model from the database.
-
-#### first()
-
-Gets the first item.
-
-#### last()
-
-Gets the last item.
-
-#### eq(num)
-
-Gets the specific position of the item.
-
-#### slice(start[, end])
-
-Gets the specific part of the model. `start` and `end` can be a negative number.
-
-#### limit(num)
-
-Limits the number of items in the model.
-
-#### skip(num)
-
-Skips the first items of the model.
-
-#### reverse()
-
-Reversed the order of the model.
-
-#### sort(orderby[, order])
-
-Sorts the items in the model. Descending when `order` equals to `1` or `desc`, otherwise ascending.
-
-#### random()
-
-Sorts data randomly.
-
-#### find(query)
-
-Finds data.
-
-Operators:
-
-- **$lt** - Less than
-- **$lte** - Less than equal
-- **$gt** - Greater than
-- **$gte** - Greater than equal
-- **$length** - Number of elements in an array
-- **$in** - An array contains the element
-- **$nin** - An array doesn't contain the element
-- **$all** - n array contains all elements
-- **$exists** - Item exists or not
-- **$ne** - Not equal
-
-#### findRaw(query)
-
-Finds data based on raw data.
-
-#### findOne(query)
-
-Finds data and returns the first matched item.
-
-[1]: https://github.com/tommy351/warehouse
\ No newline at end of file
diff --git a/source/docs/commands.md b/source/docs/commands.md
new file mode 100644
index 0000000000..e2a9a4bec6
--- /dev/null
+++ b/source/docs/commands.md
@@ -0,0 +1,119 @@
+title: Commands
+prev: configuration
+next: migration
+---
+## init
+
+``` bash
+$ hexo init [folder]
+```
+
+Setup a website. If `folder` isn't defined, Hexo will setup the website at the current directory.
+
+## new
+
+``` bash
+$ hexo new [layout]
+```
+
+Create a new article. If `layout` isn't defined, it'll be `default_layout` setting. If the title is more than one word, wrap it with quotation marks.
+
+## generate
+
+``` bash
+$ hexo generate
+```
+
+Generate static files.
+
+Option | Description
+--- | ---
+`-d` `--deploy` | Deploy after generate done
+`-w` `--watch` | Watch file changes
+
+## server
+
+``` bash
+$ hexo server
+```
+
+Start server.
+
+Option | Description
+--- | ---
+`-p` `--port` | Override default port
+`-s` `--static` | Only serve static files
+`-l` `--log` | Enable logger. Override logger format.
+
+## deploy
+
+``` bash
+$ hexo deploy
+```
+
+Deploy your website.
+
+Option | Description
+--- | ---
+`--setup` | Setup without deployment
+`--generate` | Generate before deployment
+
+## render
+
+``` bash
+$ hexo render [file2] ...
+```
+
+Option | Description
+--- | ---
+`-o` `--output` | Output destination
+
+## migrate
+
+``` bash
+$ hexo migrate
+```
+
+Migrate from other blog systems.
+
+## clean
+
+``` bash
+$ hexo clean
+```
+
+Clean the cache file (`db.json`).
+
+## list
+
+``` bash
+$ hexo list
+```
+
+List all categories/pages/posts/routes/tags.
+
+## version
+
+``` bash
+$ hexo version
+```
+
+Display version information.
+
+## Others
+
+### Safe mode
+
+``` bash
+$ hexo --safe
+```
+
+Plugins and scripts won't be loaded in safe mode. You can try this when you encounter some problems after installing a new plugin.
+
+### Debug mode
+
+``` bash
+$ hexo --debug
+```
+
+Display verbose messages in console directly. When you encounter some problems, run Hexo again in the debug mode and submit the messages on GitHub.
\ No newline at end of file
diff --git a/source/docs/configuration.md b/source/docs/configuration.md
new file mode 100644
index 0000000000..1c6dc5f7d2
--- /dev/null
+++ b/source/docs/configuration.md
@@ -0,0 +1,162 @@
+title: Configuration
+prev: setup
+next: commands
+---
+You can modify most of options in `_config.yml`.
+
+## Configuration
+
+### Site
+
+Setting | Description
+--- | ---
+`title` | The title of your website
+`subtitle` | The subtitle of your website
+`desciprtion` | The description of your website
+`author` | Your name
+`email` | Your email address
+`language` | The language used in your website. Use [IETF format](http://www.w3.org/International/articles/language-tags/). (e.g. Traditional Chinese: `zh-TW`)
+
+### URL
+
+Setting | Description | Default
+--- | --- | ---
+`url` | The URL of your website |
+`root` | The root directory of your website |
+`permalink` | The [permalink](permalinks.html) format of articles | :year/:month/:day/:title/
+`tag_dir` | Tag directory | tags
+`archive_dir` | Archive directory | archives
+`category_dir` | Category directory | categories
+`code_dir` | Include code directory | downloads/code
+
+{% note info Website in subdirectory %}
+If your website is put in subdirectory such as `http://yoursite.com/blog`. Set `url` as `http://yoursite.com/blog` and `root` as `/blog/`.
+{% endnote %}
+
+### Writing
+
+Setting | Description | Default
+--- | --- | ---
+`new_post_name` | The filename of the new post | :title.md
+`default_layout` | Default layout | post
+`auto_spacing` | Add a space between eastern and western characters | false
+`titlecase` | Transform title into proper title case | false
+`external_link` | Open external links in new tab | true
+`max_open_file` | Maximum synchronous I/O when generating files | 100
+`multi_thread` | Enable multi-thread generating | true
+`filename_case` | Transform filename into (1) lower case or (2) upper case | 0
+`highlight` | Code block settings |
+
+### Category & Tag
+
+Setting | Description | Default
+--- | --- | ---
+`default_category` | Default category | uncategorized
+`category_map` | Category slugs |
+`tag_map` | Tag slugs |
+
+### Archives
+
+Setting | Description | Default
+--- | --- | ---
+`archive` | 2: Enable pagination, 1: Disable pagination, 0: Fully disable | 2
+`category` | 2: Enable pagination, 1: Disable pagination, 0: Fully disable | 2
+`tag` | 2: Enable pagination, 1: Disable pagination, 0: Fully disable | 2
+
+### Server
+
+Setting | Description | Default
+--- | --- | ---
+`port` | Server port | 4000
+`logger` | Display request info on the console. Always enabled in debug mode. | false
+`logger_format` | Logger format |
+
+### Date / Time format
+
+Hexo uses [Moment.js](http://momentjs.com/) to parse and display date.
+
+Setting | Description | Default
+--- | --- | ---
+`date_format` | Date format | MMM D YYYY
+`time_format` | Time format | H:mm:ss
+
+### Pagination
+
+Setting | Description | Default
+--- | --- | ---
+`per_page` | The amount of the posts displayed in a single page (0 = Disable pagination) | 10
+`pagination_dir` | Pagination directory | page
+
+### Comment
+
+Setting | Description
+--- | ---
+`disqus_shortname` | [Disqus](http://disqus.com/) shortname
+
+### Extensions
+
+Setting | Description
+--- | ---
+`theme` | Current theme
+`exclude_generator` | Disabled generators (archive, category, home, page, post, tag)
+
+{% note warn Configuration files is YAML files %}
+Don't use tabs in configuration files, use spaces instead. Also, add a space after colons. Configuration files parsing error may cause Hexo can't run properly.
+{% endnote %}
+
+## Default Configuration
+
+``` yaml
+title: Hexo
+subtitle:
+description:
+author: John Doe
+email:
+language:
+
+url: http://yoursite.com
+root: /
+permalink: :year/:month/:day/:title/
+tag_dir: tags
+archive_dir: archives
+category_dir: categories
+code_dir: downloads/code
+
+new_post_name: :title.md
+default_layout: post
+auto_spacing: false
+titlecase: false
+max_open_file: 100
+multi_thread: true
+filename_case: 0
+highlight:
+ enable: true
+ line_number: true
+ tab_replace:
+
+default_category: uncategorized
+category_map:
+tag_map:
+
+archive: 2
+category: 2
+tag: 2
+
+port: 4000
+logger: false
+logger_format:
+
+date_format: MMM D YYYY
+time_format: H:mm:ss
+
+per_page: 10
+pagination_dir: page
+
+disqus_shortname:
+
+theme: light
+exclude_generator:
+
+deploy:
+ type:
+```
\ No newline at end of file
diff --git a/source/docs/configure.md b/source/docs/configure.md
deleted file mode 100644
index 790b56612f..0000000000
--- a/source/docs/configure.md
+++ /dev/null
@@ -1,182 +0,0 @@
----
-layout: page
-title: Configure
-date: 2012-11-01 18:13:30
----
-
-The global configuration file is saved at `_config.yml` in the root directory of the website.
-
-## Configure
-
-### Site
-
-- **title** - Website title
-- **subtitle** - Website subtitle
-- **description** - Website description
-- **author** - The author of the website
-- **email** - Email address of the author
-- **language** - The language used in the website ([IETF format][1]. e.g. Traditional Chinese is `zh-TW`)
-
-### URL
-
-- **url** - Website URL
-- **root** - The root directory of the website. For example, given `url` is `http://yoursite.com/child`, then `root` is `/child/`.
-- **permalink** - The URL format of articles ([Configure][2])
-- **tag_dir** - Tag directory
-- **archive_dir** - Archive directory
-- **category_dir** - Category directory
-
-### Writing
-
-- **new_post_name** - Filename of new post ([Configure][7])
-- **default_layout** - Default layout
-- **auto_spacing** - Add spaces between eastern and wastern characters
-- **titlecase** - Transform title into title case
-- **max_open_file** - Synchronous I/O maximum
-- **filename_case** - Transform file name into (1) lower case (2) uppercase
-- **highlight** - Code block settings
- - **enable** - Enable code highlight
- - **backtick_code_block** - Enable [Backtick Code Block][6]
- - **line_number** - Display line numbers
- - **tab_replace** - Tab replacement
-
-### Category & Tag
-
-- **default_category** - Default category
-- **category_map** - Category slugs
-- **tag_map** - Tag slugs
-
-### Archive
-
-`2` - Enable pagination
-`1` - Disable pagination
-`0` - Fully disable
-
-- **archive**
-- **category**
-- **tag**
-
-### Server
-
-- **port** - Server port
-- **logger** - Enable logger for server
-- **logger_format** - The format of logger ([Connect][3])
-
-### Date / Time Format
-
-Hexo uses Moment.js to parse and display date. ([Moment.js][4])
-
-- **date_format** - Date format
-- **time_format** - Time format
-
-### Pagination
-
-- **per_page** - The amount of the posts displayed in a single page(0 = Disable)
-- **pagination_dir** - Pagination directory
-
-### Disqus
-
-- **disqus_shortname** - [Disqus][5] shortname
-
-### Extensions
-
-- **themes** - Current theme
-- **exclude_generator** - The generators to disable(archive, category, home, page, post, tag)
-
-### Deployment
-
-- **type** - Deployment type
-
-Configure settings according to the deployment plugin you used.
-
-## Default
-
-``` yaml
-# Hexo Configuration
-## Docs: http://zespia.tw/hexo/docs/configure.html
-## Source: https://github.com/tommy351/hexo/
-
-# Site
-title: Hexo
-subtitle:
-description:
-author: John Doe
-email:
-language:
-
-# URL
-## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
-url: http://yoursite.com
-root: /
-permalink: :year/:month/:day/:title/
-tag_dir: tags
-archive_dir: archives
-category_dir: categories
-
-# Writing
-new_post_name: :title.md # File name of new posts
-default_layout: post
-auto_spacing: false # Add spaces between asian characters and western characters
-titlecase: false # Transform title into titlecase
-max_open_file: 100
-filename_case: 0
-highlight:
- enable: true
- backtick_code_block: true
- line_number: true
- tab_replace:
-
-# Category & Tag
-default_category: uncategorized
-category_map:
-tag_map:
-
-# Archives
-## 2: Enable pagination
-## 1: Disable pagination
-## 0: Fully Disable
-archive: 2
-category: 2
-tag: 2
-
-# Server
-## Hexo uses Connect as a server
-## You can customize the logger format as defined in
-## http://www.senchalabs.org/connect/logger.html
-port: 4000
-logger: false
-logger_format:
-
-# Date / Time format
-## Hexo uses Moment.js to parse and display date
-## You can customize the date format as defined in
-## http://momentjs.com/docs/#/displaying/format/
-date_format: MMM D YYYY
-time_format: H:mm:ss
-
-# Pagination
-## Set per_page to 0 to disable pagination
-per_page: 10
-pagination_dir: page
-
-# Disqus
-disqus_shortname:
-
-# Extensions
-## Plugins: https://github.com/tommy351/hexo/wiki/Plugins
-## Themes: https://github.com/tommy351/hexo/wiki/Themes
-theme: light
-exclude_generator:
-
-# Deployment
-## Docs: http://zespia.tw/hexo/docs/deploy.html
-deploy:
- type:```
-
-[1]: http://www.w3.org/International/articles/language-tags/
-[2]: permalink.html
-[3]: http://www.senchalabs.org/connect/logger.html
-[4]: http://momentjs.com/docs/#/displaying/format/
-[5]: http://disqus.com/
-[6]: tag-plugins.html
-[7]: writing.html
\ No newline at end of file
diff --git a/source/docs/contribute.md b/source/docs/contribute.md
deleted file mode 100644
index 3b8ff72944..0000000000
--- a/source/docs/contribute.md
+++ /dev/null
@@ -1,68 +0,0 @@
----
-layout: page
-title: Contribute
-date: 2012-11-01 18:13:30
----
-
-## Report Issues
-
-You may have found some bugs when using Hexo, or have some questions and recommendations. Feel free to submit them on GitHub.
-
-You can clone the **dev** branch on GitHub to try the new features. It's updated everyday!
-
-```
-npm install -g https://github.com/tommy351/hexo/archive/dev.tar.gz
-```
-
-[Report an issue][1]
-
-## Write Docs
-
-If you found there's an error in the docs, you can:
-
-1. Fork this project
-2. Create a new branch based on **site** branch
-3. Edit the docs
-4. Submit a pull request to **site** branch
-
-If you want to help translate the docs, create a new folder in `source` folder and copy source files into it. For example:
-
-``` plain
-zh-TW
-|-- docs
-|-- index.md
-|-- plugins
-|-- themes
-```
-
-And add language setting in every posts like this:
-
-``` plain
----
-layout: page
-title: 貢獻
-lang: zh-TW
-date: 2012-11-01 18:13:30
----
-```
-
-Please follow the [IETF format][3].
-
-[Source code][2]
-
-## Participate
-
-If you want to participate in the development, you can:
-
-1. Fork this project
-2. Create a new branch
-3. Submit a pull request to **dev** branch after the new feature is done
-
-If you make an awesome plugin, you can submit a pull request, too. The plugin you developed may be a part of the main program!
-
-[Source code][4]
-
-[1]: https://github.com/tommy351/hexo/issues
-[2]: https://github.com/tommy351/hexo/tree/site
-[3]: http://www.w3.org/International/articles/language-tags/
-[4]: https://github.com/tommy351/hexo
\ No newline at end of file
diff --git a/source/docs/contributing.md b/source/docs/contributing.md
new file mode 100644
index 0000000000..60d3709825
--- /dev/null
+++ b/source/docs/contributing.md
@@ -0,0 +1,54 @@
+title: Contributing
+prev: troubleshooting
+---
+It's great to hear you'd like to make Hexo more awesome! When modifying JavaScript code, please keep the following in your mind.
+
+- Please follow the [Google JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
+- Comment in [JSDoc](http://usejsdoc.org/) format.
+
+## Development
+
+1. Fork the Hexo repository.
+2. Clone the repository to your computer.
+
+ ``` bash
+ $ git clone git://github.com//hexo.git
+ ```
+
+3. Install dependencies.
+
+ ``` bash
+ $ make install
+ ```
+
+4. Create a new branch and start hacking.
+5. Push the branch.
+6. Create a pull request on GitHub.
+
+{% note warn Don't change version in package.json %}
+When making changes on Hexo, don't change version number in `package.json`.
+{% endnote %}
+
+## Updating Documentation
+
+The Hexo documentation is open-source and you can find it on `site` branch of Hexo repository. Here's how you can make the documentation better:
+
+1. Fork the Hexo repository.
+2. Clone the repository to your computer.
+
+ ``` bash
+ $ git clone -b site git://github.com//hexo.git
+ ```
+
+3. Create a new branch and start editing.
+4. See live changes with `hexo server`.
+5. Push the branch.
+6. Create a pull request on GitHub.
+
+## Reporting an Issue
+
+When you come across problems, try to find the solution [here](troubleshooting.html). If the problem still exists, please do the following:
+
+1. Run it again in debug mode.
+2. Run `hexo version` to check the version info
+3. Post both debug message and version info on GitHub.
\ No newline at end of file
diff --git a/source/docs/deploy.md b/source/docs/deploy.md
deleted file mode 100644
index 585d0e755c..0000000000
--- a/source/docs/deploy.md
+++ /dev/null
@@ -1,123 +0,0 @@
----
-layout: page
-title: Deploy
-date: 2012-11-01 18:13:30
----
-
-It's easy to deploy with Hexo. It just needs 1 command to complete all the settings.
-
-## GitHub
-
-### Configure
-
-Edit `_config.yml`. Fill `repository` with GitHub repository. If repository is like `username.github.io`, fill `branch` with `master`, otherwise `gh-pages`.
-
-``` yaml
-deploy:
- type: github
- repository:
- branch:
-```
-
-- **repository** - GitHub repository
-- **branch** - If repository is like `username.github.io`, fill it with `master`, otherwise `gh-pages`
-
-### Deploy
-
-After the static files are generated, execute the following to deploy. You can add `--generate` option to generate automatically before deploy.
-
-``` bash
-hexo deploy
-hexo deploy --generate
-```
-
-### Remove
-
-Execute the following command to remove deployment.
-
-``` bash
-rm -rf .deploy
-```
-
-### Custom Domain
-
-Create a file name `CNAME` in `source` folder with the following content.
-
-```
-example.com
-```
-
-Configure DNS according to the type of domain.
-
-#### Top-level Domain
-
-If the domain is like `example.com`, add A record `204.232.175.78`.
-
-#### Subdomain
-
-If the domain is like `username.example.com`, add CNAME record `username.github.io`.
-
-Check [GitHub Pages][1] for more info.
-
-## Heroku
-
-### Configure
-
-Edit `_config.yml`.
-
-``` yaml
-deploy:
- type: heroku
- repository:
-```
-
-- **repository** - Heroku repository
-
-### Deploy
-
-After the static files are generated, execute the following to deploy. You can add `--generate` option to generate automatically before deploy.
-
-``` bash
-hexo deploy
-hexo deploy --generate
-```
-
-Check [Heroku][2] for more info.
-
-### Remove
-
-Remove `.git`, `app.js` and `Procfile`.
-
-## Rsync
-
-### Configure
-
-Edit`_config.yml`.
-
-``` yaml
-deploy:
- type: rsync
- host:
- user:
- root:
- port:
- delete:
-```
-
-- **host** - Address of remote host
-- **user** - Username
-- **root** - Root directory of remote host
-- **port** - Port (Default is `22`)
-- **delete** - Delete old files on remote host (Default is `true`)
-
-### Deploy
-
-After the static files are generated, execute the following to deploy. You can add `--generate` option to generate automatically before deploy.
-
-``` bash
-hexo deploy
-hexo deploy --generate
-```
-
-[1]: https://help.github.com/articles/setting-up-a-custom-domain-with-pages
-[2]: https://devcenter.heroku.com/
diff --git a/source/docs/deployment.md b/source/docs/deployment.md
new file mode 100644
index 0000000000..d2dfd0102b
--- /dev/null
+++ b/source/docs/deployment.md
@@ -0,0 +1,90 @@
+title: Deployment
+prev: server
+next: permalinks
+---
+To deploy your site with Hexo, you only need one command.
+
+``` bash
+$ hexo deploy
+```
+
+## GitHub
+
+Edit `_config.yml`.
+
+``` yaml
+deploy:
+ type: github
+ repository:
+ branch:
+```
+
+Option | Description
+--- | ---
+`repository` | GitHub repository URL (It's better to use HTTPS)
+`branch` | Target branch. If your repository name is `username.github.io` or `username.github.com`, this value will be `master`, `gh-pages` otherwise.
+
+### Remove
+
+Remove `.deploy` folder.
+
+``` bash
+$ rm -rf .deploy
+```
+
+### Custom Domain
+
+Create a file named `CNAME` in `source` folder with the following content.
+
+```
+example.com
+```
+
+- **Top-level Domain:** Add A record `204.232.175.78`
+- **Subdomain**: Add CNAME record `blog.example.com`.
+
+Check [GitHub Pages](https://help.github.com/articles/setting-up-a-custom-domain-with-pages) for more info.
+
+## Heroku
+
+Edit `_config.yml`.
+
+``` yaml
+deploy:
+ type: heroku
+ repository:
+```
+
+Option | Description
+--- | ---
+`repository` | Heroku repository URL
+
+### Remove
+
+Remove `.git`, `app.js` & `Procfile`.
+
+## Rsync
+
+Edit `_config.yml`.
+
+``` yaml
+deploy:
+ type: rsync
+ host:
+ user:
+ root:
+ port:
+ delete:
+```
+
+Option | Description | Default
+--- | --- | ---
+`host` | Address of remote host |
+`user` | Username |
+`root` | Root directory of remote host |
+`port` | Port | 22
+`delete` | Delete old files on remote host | true
+
+## Other Methods
+
+All generated files are saved in `public` folder. You can copy it to wherever you like.
\ No newline at end of file
diff --git a/source/docs/events.md b/source/docs/events.md
index 172e3852aa..427169fea8 100644
--- a/source/docs/events.md
+++ b/source/docs/events.md
@@ -1,34 +1,45 @@
----
-layout: page
title: Events
-date: 2012-11-01 18:13:30
+prev: models
+next: plugins
---
+Hexo inherits EventEmitter of Node.js. You can subscribe or publish specified events. For example:
-[Global variable][1] `hexo` itself is a [EventEmitter][2] object. You can listen or emit events.
-
-## Usage
-
-Listen an event:
-
-```
+``` js
hexo.on('ready', function(){
- ...
+ console.log('Hexo is ready to go!');
});
```
-Emit an event:
+## Methods
-```
-hexo.emit('event', [arg1], [arg2], [….]);
-```
+All methods except `emit` returns the emitter itself, so calls can be chained.
+
+### addListener(event, listener)
+### on(event, listener)
+
+Listens to the specific event.
-[Reference][2]
+### once(event, listener)
-## Default events
+Listens to the specified event **only once**. After the event is fired, the listener will be removed.
+
+### removeListener(event, listener)
+
+Removes a listener from the specified event.
+
+### removeAllListeners([event])
+
+Removes all listeners.
+
+### emit(event, [arg1], [arg2], […])
+
+Fires the specified event. Returns `true` if event had listener, `false` otherwise.
+
+## Events
### ready
-Called after all configurations and plugins loaded completely.
+Called once Hexo is initialized.
### generateBefore
@@ -48,15 +59,16 @@ Called after processing.
### new
-Called after a new article created. Return an argument `target` which means the absolute path of the new file.
+Called after a new post file is created.
-### server
+Argument | Description
+--- | ---
+`target` | Absolute path of the post file
-Called after the server is on.
+### server
-### Exit
+Called after server is on.
-Called when process exits.
+### exit
-[1]: global-variables.html
-[2]: http://nodejs.org/api/events.html#events_class_events_eventemitter
\ No newline at end of file
+Called when Hexo exits.
\ No newline at end of file
diff --git a/source/docs/generating.md b/source/docs/generating.md
new file mode 100644
index 0000000000..3e70f0ec0c
--- /dev/null
+++ b/source/docs/generating.md
@@ -0,0 +1,40 @@
+title: Generating
+prev: writing
+next: tag-plugins
+---
+Generate static files with Hexo is quite easy and fast.
+
+``` bash
+$ hexo generate
+```
+
+### Watch for File Changes
+
+Hexo can watch for file changes and regenerate files immediately.
+
+``` bash
+$ hexo generate --watch
+```
+
+{% note info Restart Hexo after configuration changed %}
+Hexo doesn't watch for configuration file changes. You have to restart Hexo to make the new configurations take effects.
+{% endnote %}
+
+### Multi-thread Generating
+
+Hexo supports multi-thread generating since 2.0. To enable this feature, edit `_config.yml`.
+
+``` yaml
+multi_thread: true
+```
+
+You can change how many threads to use. Just edit `multi_thread` with the number of threads. The number of threads is the number of CPU cores by default. It's not recommended to set any value higher than it.
+
+### Deploy After Generating
+
+To deploy after generating, you can run one of the following commands. Both of them are equaled.
+
+``` bash
+$ hexo generate --deploy
+$ hexo deploy --generate
+```
\ No newline at end of file
diff --git a/source/docs/global-variables.md b/source/docs/global-variables.md
deleted file mode 100644
index 88d045dc90..0000000000
--- a/source/docs/global-variables.md
+++ /dev/null
@@ -1,215 +0,0 @@
----
-layout: page
-title: Global Variables
-date: 2012-11-01 18:13:30
----
-
-Hexo creates a namespace `hexo` when initializing with the following read-only variables.
-
-- **base_dir** - Root directory
-- **public_dir** - Static files directory (public)
-- **source_dir** - Source files directory (source)
-- **theme_dir** - Theme directory (theme/theme_name)
-- **plugin_dir** - Plugin directory (node_modules)
-- **script_dir** - Script directory (scripts)
-- **scaffold_dir** - Scaffold directory (scaffolds)
-- **core_dir** - Program root directory (hexo)
-- **lib_dir** - Program library directory (hexo/lib)
-- **version** - Version of Hexo
-- **env** - Environment
-- **safe** - Safe mode
-- **debug** - Debug mode
-- **config** - [Global configuration][1], the content of `_config.yml`
-- **render** - [Render][5]
-- **[extend](#extend)** - Extensions
-- **[util](#util)** - Utilities
-- **[i18n](#i18n)** - Internationalization (i18n) module
-- **[route](#route)** - Route module
-- **[call](#call)** - Call other console
-- **[db](#db)** - Database
-
-
-### extend
-
-**extend** is the module handling all extensions. Each extension has two method: **list** & **register**. The former lists all extensions that the object handling; the letter registers a new extension to the object.
-
-#### generator
-
-- **list** - Returns an array.
-- **register(fn)** - Registers a extension.
-
-#### renderer
-
-- **list** - Returns an object. The element in the object has `output` property.
-- **register(name, output, fn, sync)** - Registers a extension. `name` is the name of the extension. `output` is the extension of output files. `sync` is sync mode. (Default is `false`)
-
-#### tag
-
-- **list** - Returns an object.
-- **register(name, fn, ends)** - Registers a extension. `name` is the name of the extension. `ends` is end tag. (Default is `false`)
-
-#### deployer
-
-- **list** - Returns an object.
-- **register(name, fn)** - Registers a extension. `name` is the name of the extension.
-
-#### processor
-
-- **list** - Returns an array.
-- **register(fn)** - Registers a extension.
-
-#### helper
-
-- **list** - Returns an array.
-- **register(name, fn)** - Registers a extension. `name` is the name of the extension.
-
-#### console
-
-- **list** - Return an object. The element in the object has `description` property.
-- **register(name, desc, fn)** - Registers a extension. `name` is the name of the extension. `desc` is the description of the extension.
-
-#### migrator
-
-- **list** - Returns an object.
-- **register(name, fn)** - Registers a extension. `name` is the name of the extension.
-
-Check [plugin development][2] for more info.
-
-
-### util
-
-**util** is the utilities, including the following module:
-
-#### file
-
-Operates file I/O, owning the following method:
-
-- **mkdir(dest, callback)**
-- **write(dest, content, callback)**
-- **copy(src, dest, callback)**
-- **dir(src, callback)**
-- **read(src, callback)**
-- **readSync(src, callback)**
-- **empty(target, exclude, callback)**
-
-#### highlight(string, options)
-
-Exports highlighted code block. The following is the options:
-
-- **gutter** - Display line numbers
-- **first_line** - The first line number
-- **lang** - Language
-- **caption** - Caption
-
-#### titlecase(string)
-
-Transforms a string into proper title capitalization.
-
-#### yfm(string)
-
-Parses [YAML Front Matter][3]. Exports an object. The content is `_content` property.
-
-
-### i18n
-
-**i18n** is internationalization (i18n) module. Here's how to use:
-
-``` js
-var i18n = new hexo.i18n();
-```
-
-A i18n object owns the following methods:
-
-#### get
-
-The first argument must be the key value. The other arguments will be processed by [util.format][4].
-
-When the first argument is an array, it will detect the second argument to process plural nouns.
-
-- 2 elements in the 1st argument:
- - n > 1: Use the 2nd element
- - n <= 1: Use the 1st element
-- 3 elements in the 1st argument:
- - n > 1: Use the 3rd element
- - 0 < n <= 1: Use the 2nd element
- - n == 0: Use the 1st element
-
-#### set(key, value)
-
-- **key** - Key value
-- **value** - Value
-
-#### list([obj])
-
-Returns all elements of the object if `obj` undefined. Replaces the object with the argument if `obj` is an object.
-
-#### load(path, callback)
-
-Loads language files automatically. `path` is the language file directory. Hexo will based on `language` setting in `_config.yml`. If the language file is not found, it will load `default.yml` instead. So the directory must have `default.yml` at least.
-
-
-### route
-
-Hexo has started using route module to handle all paths of the website since version 0.3.
-
-#### get(path)
-
-Gets the content of the path.
-
-``` js
-route.get(path, function(err, result){
- ...
-});
-```
-
-#### set(path, content)
-
-Sets the content of the path. `content` can be a function or else. If it is a function, it must pass a callback with two arguments: `(err, result)`.
-
-``` js
-route.set(path, content);
-
-route.set(path, function(fn){
- fn(null, 'content');
-});
-```
-
-#### format(path)
-
-Formats the path. Adds `index.html` if the path is empty or ended with `/`.
-
-#### remove(path)
-
-Deletes a path.
-
-#### list()
-
-Returns an object.
-
-
-### call
-
-#### call(name, [args], callback)
-
-- **name** - Console name
-- **args** - Arguments
-- **callback** - Callback function
-
-`call` is used to call other console plugins. For example:
-
-``` js
-hexo.call('generate', function(){
- // ...
-});
-```
-
-
-### db
-
-Database.
-
-[1]: configure.html
-[2]: plugin-development.html
-[3]: https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter
-[4]: http://nodejs.org/api/util.html#util_util_format_format
-[5]: render.html
\ No newline at end of file
diff --git a/source/docs/helpers.md b/source/docs/helpers.md
index f358b88b32..2fdd8e260c 100644
--- a/source/docs/helpers.md
+++ b/source/docs/helpers.md
@@ -1,55 +1,68 @@
----
-layout: page
title: Helpers
-date: 2012-11-01 18:13:30
+prev: pagination
+next: i18n
---
-
-Helpers help you transform data into HTML string in templates, making it easier to develop a theme. The following is built-in helpers.
+Helpers help you inserts specified content in theme or processes contents in theme quickly.
### css
-Loads CSS file. `path` can be an array or a string.
+Loads CSS files. `path` can be an array or a string. If `path` isn't prefixed with `/` or any protocol, it'll be prefixed with root URL. If you didn't add extension name `.css` after `path`, it'll be added.
-```
-<%- css(path) %>
+``` js
+<%- css(path, [path1], [path2], [...]) %>
```
**Examples:**
``` js
<%- css('style.css') %>
-//
+//
<%- css(['style.css', 'screen.css']) %>
-//
-//
+//
+//
```
### js
-Loads JavaScript file. `path` can be an array or a string.
+Loads JavaScript files. `path` can be an array or a string. If `path` isn't prefixed with `/` or any protocol, it'll be prefixed with root URL. If you didn't add extension name `.js` after `path`, it'll be added.
-```
-<%- js(path) %>
+``` js
+<%- js(path, [path1], [path2], [...]) %>
```
**Examples:**
``` js
<%- js('script.js') %>
-//
+//
<%- js(['script.js', 'gallery.js']) %>
-//
-//
+//
+//
```
+### Conditional Tags
+
+Conditional tags help you check the status of current page.
+
+Helper | Description
+--- | ---
+`is_current(path)` | Checks if `path` matches the URL of current page
+`is_home()` | Checks if the home page is being displayed
+`is_post()` | Checks if posts are being displayed
+`is_archive()` | Checks if archive pages are being displayed
+`is_year()` | Checks if yearly archive pages are being displayed
+`is_month()` | Checks if monthly archive pages are being displayed
+`is_category()` | Checks if category pages are being displayed
+`is_tag()` | Checks if tag pages are being displayed
+
### gravatar
-Loads Gravatar.
+Inserts a Gravatar image.
-```
-<%- gravatar(email, [size]) %>
+``` js
+<%- gravatar(email, [size]);
```
**Examples:**
@@ -66,15 +79,15 @@ Loads Gravatar.
Clears all spaces in a string.
-```
+``` js
<%- trim(string) %>
```
### strip_html
-Clears all HTML tags in a string.
+Sanitizes all HTML tags in a string.
-```
+``` js
<%- strip_html(string) %>
```
@@ -87,9 +100,9 @@ Clears all HTML tags in a string.
### titlecase
-Transforms a string into proper title capitalization.
+Transforms a string into proper title caps.
-```
+``` js
<%- titlecase(string) %>
```
@@ -102,138 +115,107 @@ Transforms a string into proper title capitalization.
### partial
-Loads other template. Use `locals` to define local variables. (Same as [express-partials][1])
+Loads other template files. You can define local variables in `local`.
-```
+``` js
<%- partial(layout, [locals]) %>
```
### tagcloud
-Inserts tag cloud. Input `tags` with [template data][3]. The following is `options`.
+Inserts a tag cloud.
+``` js
+<%- tagcloud([tags], [options]) %>
```
-<%- tagcloud(tags, [options]) %>
-```
-
-**Options:**
-- **min_font** - Minimal font size
-- **max_font** - Maximum font size
-- **unit** - Unit of font size
-- **amount** - Amount of tags
-- **orderby** - Order of tags
-- **order** - Sort order. `1`, `asc` as ascending; `-1`, `desc` as descending.
-
-**Default:**
-
-``` json
-{
- "min_font": 10,
- "max_font": 20,
- "unit": "px",
- "amount": 40,
- "orderby": "name",
- "order": 1
-}
-```
+Option | Description | Default
+--- | --- | ---
+`min_font` | Minimal font size | 10
+`max_font` | Maximum font size | 20
+`unit` | Unit of font size | px
+`amount` | Total amount of tags | 40
+`orderby` | Order of tags | name
+`order` | Sort order. `1`, `sac` as ascending; `-1`, `desc` as descending | 1
### paginator
-Inserts paginator. The following is `options`.
+Inserts a paginator.
-```
+``` js
<%- paginator(options) %>
```
-**Options:**
-
-- **base** - Base URL
-- **format** - URL format
-- **total** - The total amount of pages
-- **current** - Current page number
-- **prev_text** - The previous page text
-- **next_text** - The next page text
-- **space** - The space text
-- **prev_next** - Display previous and next links
-- **end_size** - Number of pages displayed on the start and the end side
-- **mid_size** - Number of pages displayed between current page, but not including current page
-- **show_all** - Display all pages
-
-**Default:**
-
-``` json
-{
- "base": "/",
- "format": "page/%d/",
- "total": 1,
- "current": 0,
- "prev_text": "Prev",
- "next_text": "Next",
- "space": "&hellp;",
- "prev_next": true,
- "end_size": 1,
- "mid_size": 2,
- "show_all": false
-}
-```
+Option | Description | Default
+--- | --- | ---
+`base` | Base URL | /
+`format` | URL format | page/%d/
+`total` | Total amount of pages | 1
+`current` | Current page number | 0
+`prev_text` | The link text of previous page. Works only if `prev_next` is set to true. | Prev
+`next_text` | The link text of next page. Works only if `prev_next` is set to true. | Next
+`space` | The space text | &hellp;
+`prev_next` | Display previous and next links | true
+`end_size` | The number of pages displayed on the start and the end side | 1
+`mid_size` | The number of pages displayed between current page, but not including current page | 2
+`show_all` | Display all pages. If this is set true, `end_size` and `mid_size` will not works. | false
### date
-Displays date. `date` is a date object. `format` is the output format ([Moment.js][5]), `date_format` in [global configuration][4] by default.
+Inserts formatted date. `date` can be unix time, ISO string, date object, or moment.js object. `format` is `date_format` setting by default.
-```
+``` js
<%- date(date, [format]) %>
```
**Examples:**
``` js
-<%- date(new Date()) %>
+<%- date(Date.now()) %>
// Jan 1, 2013
-<%- date(new Date(), 'YYYY/M/D') %>
+<%- date(Date.now(), 'YYYY/M/D') %>
// 2013/1/1
```
### date_xml
-Displays date in XML format. `date` is a date object.
+Inserts date in XML format. `date` can be unix time, ISO string, date object, or moment.js object. `format` is `date_format` setting by default.
-```
+``` js
<%- date_xml(date) %>
```
**Examples:**
``` js
-<%- date_xml(new Date()) %>
+<%- date_xml(Date.now()) %>
// 2013-01-01T00:00:00.000Z
```
### time
-Displays time. `date` is a date object. `format` is the output format ([Moment.js][5]), `time_format` in [global configuration][4] by default.
+Inserts formatted time. `date` can be unix time, ISO string, date object, or moment.js object. `format` is `time_format` setting by default.
-```
-<%- time(date, [format]) %>
+``` js
+<%- date(date, [format]) %>
```
**Examples:**
``` js
-<%- time(new Date()) %>
+<%- time(Date.now()) %>
// 13:05:12
-<%- time(new Date(), 'h:mm:ss a') %>
+<%- time(Date.now(), 'h:mm:ss a') %>
// 1:05:12 pm
```
### full_date
-Displays full date. `date` is a date object. `format` is the output format ([Moment.js][5]), `date_format` plus `time_format` in [global configuration][4] by default.
+Inserts formatted date and time. `date` can be unix time, ISO string, date object, or moment.js object. `format` is `date_format + time_format` setting by default.
-```
+``` js
<%- full_date(date, [format]) %>
```
@@ -249,37 +231,27 @@ Displays full date. `date` is a date object. `format` is the output format ([Mo
### moment
-[Moment.js](http://momentjs.com/)
+[Moment.js] library.
-### search_form
+### searh_form
-Returns a Google search form. The following is `options`.
+Inserts a Google search form.
-```
+``` js
<%- search_form(options) %>
```
-**Options:**
-
-- **class** - Form class name
-- **text** - Search hint word
-- **button** - Whether to display search button. The value can be a boolean or a string.
-
-**Defaults:**
-
-``` json
-{
- "class": "search-form",
- "text": "Search",
- "button": false
-}
-```
+Option | Description | Default
+--- | --- | ---
+`class` | The class name of form | search-form
+`text` | Search hint word | Search
+`button` | Display search button. The value can be a boolean or a string. When the value is a string, it'll be the text of the button. | false
### markdown
-Renders string with Markdown.
+Renders a string with Markdown.
-```
+``` js
<%- markdown(str) %>
```
@@ -292,24 +264,24 @@ Renders string with Markdown.
### word_wrap
-Wraps the text into lines no longer than `length`. `length` is 80 by default。
+Wraps text into lines no longer than `length`. `length` is 80 by default.
-```
+``` js
<%- word_wrap(str, [length]) %>
```
**Examples:**
-```
+``` js
<%- word_wrap('Once upon a time', 8) %>
// Once upon\n a time
```
### truncate
-Truncates a given `text` after a given `length`.
+Truncates text after `length`.
-```
+``` js
<%- truncate(text, length) %>
```
@@ -322,9 +294,9 @@ Truncates a given `text` after a given `length`.
### truncate_words
-Truncates words of a given `text` after a given `length`.
+Truncates words after `length`.
-```
+``` js
<%- truncate_words(text, length) %>
```
@@ -335,75 +307,11 @@ Truncates words of a given `text` after a given `length`.
// Once upon a time
```
-### is_current
-
-Checks if `path` is being displayed.
-
-```
-<%- is_current(path) %>
-```
-
-### is_home
-
-Check if the home page is being displayed
-
-```
-<%- is_home() %>
-```
-
-### is_post
-
-Check if the post is being displayed.
-
-```
-<%- is_post() %>
-```
-
-### is_archive
-
-Check if the archives is being displayed.
-
-```
-<%- is_archive() %>
-```
-
-### is_year
-
-Check if the yearly archives is being displayed.
-
-```
-<%- is_year() %>
-```
-
-### is_month
-
-Check if the monthly archives is being displayed.
-
-```
-<%- is_month() %>
-```
-
-### is_category
-
-Check if the category page is being displayed.
-
-```
-<%- is_category() %>
-```
-
-### is_tag
-
-Check if the tag page is being displayed.
-
-```
-<%- is_tag() %>
-```
-
### link_to
-Inserts a link. `path` is the link destination. `text` is the link text. `external` is whether the link is opened in a new window.
+Inserts a link.
-```
+``` js
<%- link_to(path, [text], [external]) %>
```
@@ -422,9 +330,9 @@ Inserts a link. `path` is the link destination. `text` is the link text. `extern
### mail_to
-Inserts a mail link. `path` is the link destination. `text` is the link text.
+Inserts a mail link.
-```
+``` js
<%- mail_to(path, [text]) %>
```
@@ -440,100 +348,61 @@ Inserts a mail link. `path` is the link destination. `text` is the link text.
### list_categories
-Inserts a list of categories. The following is `options`.
+Inserts a list of all categories.
-```
+``` js
<%- list_categories([options]) %>
```
-**Options:**
-
-- **orderby** - Order of tags
-- **order** - Sort of order. `1`, `asc` as ascending; `-1`, `desc` as descending.
-- **show_count** - Whether to show the number of posts
-
-**Defaults:**
-
-``` json
-{
- "orderby": "name",
- "order": 1,
- "show_count": true
-}
-```
+Option | Description | Default
+--- | --- | ---
+`orderby` | Order of categories | name
+`order` | Sort of order. `1`, `sac` as ascending; `-1`, `desc` as descending | 1
+`show_count` | Display the total amount of posts for each category | true
### list_tags
-Inserts a list of tags. The following is `options`.
+Inserts a list of all categories.
-```
+``` js
<%- list_tags([options]) %>
```
-**Options:**
-
-- **orderby** - Order of tags
-- **order** - Sort of order. `1`, `asc` as ascending; `-1`, `desc` as descending.
-- **show_count** - Whether to show the number of posts
-
-**Defaults:**
-
-``` json
-{
- "orderby": "name",
- "order": 1,
- "show_count": true
-}
-```
+Option | Description | Default
+--- | --- | ---
+`orderby` | Order of categories | name
+`order` | Sort of order. `1`, `sac` as ascending; `-1`, `desc` as descending | 1
+`show_count` | Display the total amount of posts for each tag | true
### list_archives
-Inserts a list of archives. The following is `options`.
+Inserts a list of archives.
+``` js
+<%- list_archive([options]) %>
```
-<%- list_archives([options]) %>
-```
-
-**Options:**
-- **type** - Type. `yearly` as yearly archives; `monthly` as monthly archives (default).
-- **order** - Sort of order. `1`, `asc` as ascending; `-1`, `desc` as descending.
-- **show_count** - Whether to show the number of posts
-- **format** - Date format. `MMMM YYYY` by default. ([Moment.js][5])
-
-**Defaults:**
-
-``` json
-{
- "type": "monthly",
- "order": 1,
- "show_count": true,
- "format": "MMMM YYYY"
-}
-```
+Option | Description | Default
+--- | --- | ---
+`type` | Type. This value can be `yearly` or `monthly`. | monthly
+`order` | Sort of order. `1`, `sac` as ascending; `-1`, `desc` as descending | 1
+`show_count` | Display the total amount of posts for each tag | true
+`format` | Date format | MMMM YYYY
### number_format
-Formats a `number`. The following is `options`.
+Formats a number.
+``` js
<%- number_format(number, options) %>
-
-**Options:**
-
-- **precision** - The precision of the number. The value can be `false` or nonnegative integer.
-- **delimiter** - The thousands delimiter.
-- **separator** - The sperator between the fractional and integer digits.
-
-**Defaults:**
-
-``` json
-{
- "precision": false,
- "delimiter": ",",
- "separator": "."
-}
```
+Option | Description | Default
+--- | ---
+`precision` | The precision of number. The value can be `false` or a nonnegative integer. | false
+`delimiter` | The thousands delimiter | ,
+`separator` | The separator between the fractional and integer digits. | .
+
**Examples:**
``` js
@@ -551,10 +420,4 @@ Formats a `number`. The following is `options`.
<%- number_format(12345.67, {separator: '/'}) %>
// 12,345/67
-```
-
-[1]: https://github.com/publicclass/express-partials
-[2]: render.html
-[3]: template-data.html
-[4]: configure.html
-[5]: http://momentjs.com/docs/#/displaying/format/
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/source/docs/i18n.md b/source/docs/i18n.md
new file mode 100644
index 0000000000..348262aa19
--- /dev/null
+++ b/source/docs/i18n.md
@@ -0,0 +1,42 @@
+title: Internationalization (i18n)
+prev: helpers
+next: models
+---
+Hexo has a simple i18n module built-in, which means you can make Hexo says your language!
+
+To enable i18n for Hexo, edit `language` setting. The language code must be written in [IETF format](http://www.w3.org/International/articles/language-tags/). For example: Traditional Chinese is `zh-TW`.
+
+``` yaml
+language: zh-TW
+```
+
+## Structure
+
+``` plain
+.
+├── default.yml
+└── zh-TW.yml
+```
+
+All language files must put into `languages` folder and be written in YAML format. All `languages` folder must have `default.yml` at least.
+
+{% note warn Write language files in YAML format %}
+Don't use tabs in language files, use spaces instead. Also, add a space after colons.
+{% endnote %}
+
+## i18n in Theme
+
+To use i18n in the theme. Use `__` (double underscores) with the key you set in language files.
+
+``` js
+<%= __('key') %>
+```
+
+You can even pass more than one arguments:
+
+``` js
+<%= __('Hello %s!', 'World') %>
+// => Hello World!
+```
+
+`%s` in the first string will be replaced with the second string. The result will be `Hello World!`.
\ No newline at end of file
diff --git a/source/docs/index.md b/source/docs/index.md
index 2f7e957eeb..c5dd197f03 100644
--- a/source/docs/index.md
+++ b/source/docs/index.md
@@ -1,53 +1,9 @@
+title: Docs
+hide_title: true
+next: installation
---
-layout: page
-title: Documentation
-date: 2012-11-01 18:13:30
----
-
-## Getting Started
-
-#### [Install](install.html)
-
-#### [Setup](setup.html)
-
-#### [Configure](configure.html)
-
-#### [Deploy](deploy.html)
-
-#### [Migrate](migrate.html)
-
-## Usage
-
-#### [Writing](writing.html)
-
-#### [Tag Plugins](tag-plugins.html)
-
-#### [Server](server.html)
-
-#### [Scaffolds](scaffolds.html)
-
-#### [Permalink](permalink.html)
-
-#### [Scripts](scripts.html)
-
-#### [Command-line Interface (CLI)](cli.html)
-
-## Development
-
-#### [Global Variables](global-variables.html)
-
-#### [Template Data](template-data.html)
-
-#### [Helpers](helpers.html)
-
-#### [Collection](collection.html)
-
-#### [Events](events.html)
-
-#### [Render](render.html)
-
-#### [Theme Development](theme-development.html)
+Welcome to the Hexo docs! This documentation can help you get started with Hexo.
-#### [Plugin Development](plugin-development.html)
+## What's Hexo?
-#### [Contribute](contribute.html)
\ No newline at end of file
+Hexo is a fast and simple static site generator.
\ No newline at end of file
diff --git a/source/docs/install.md b/source/docs/install.md
deleted file mode 100644
index 4b3c4215a9..0000000000
--- a/source/docs/install.md
+++ /dev/null
@@ -1,137 +0,0 @@
----
-layout: page
-title: Install
-date: 2012-11-01 18:13:30
----
-
-Before installing Hexo, you should install [Git][2] & [Node.js][1] first.
-
-## Contents
-
-- [Windows](#windows)
-- [Mac](#mac)
-- [Linux](#linux)
-
-
-## Windows
-
-### Git
-
-Download & execute [msysgit][7].
-
-### Node.js
-
-It's very easy to install Node.js. Just [download][1] the installer and execute it.
-
-### Hexo
-
-Use [npm][3] to install.
-
-``` bash
-npm install -g hexo
-```
-
-
-## Mac
-
-### Git
-
-Mac has already built-in an older version Git. If you want to update it, you can try the following way.
-
-1. Use [Homebrew][5].
-
- brew install git
-
-2. Use [MacPorts][6].
-
- sudo port install git-core
-
-3. Use [Installer](http://code.google.com/p/git-osx-installer/).
-
-If an error occurred, maybe it's because you didn't install the compiler first, please go to App Store, download & install Xcode.
-
-### Node.js
-
-There are many way to install Node.js in Mac. We use [nvm][4] to install it.
-
-Execute the following command.
-
-``` bash
-git clone git://github.com/creationix/nvm.git ~/nvm
-```
-
-After the installation is done, add the following content in `~/.bash_profile` or `~/.bashrc` and open a new terminal window.
-
-```
-. ~/nvm/nvm.sh
-```
-
-Then you can install Node.js with [nvm][4]. It takes time to compile. Be patiently.
-
-``` bash
-nvm install 0.8
-```
-
-### Hexo
-
-Use [npm][3] to install.
-
-``` bash
-npm install -g hexo
-```
-
-
-## Linux
-
-### Git
-
-**Ubuntu, Debian:**
-
-``` bash
-sudo apt-get install git-core
-```
-
-**Fedora, Red Hat, CentOS:**
-
-``` bash
-sudo yum install git-core
-```
-
-### Node.js
-
-There are many way to install Node.js in Linux. We use [nvm][4] to install it.
-
-Execute the following command.
-
-``` bash
-git clone git://github.com/creationix/nvm.git ~/nvm
-```
-
-After the installation is done, add the following content in `~/.bash_profile` or `~/.bashrc` and open a new terminal window.
-
-``` plain
-. ~/nvm/nvm.sh
-```
-
-Then you can install Node.js with [nvm][4]. It takes time to compile. Be patiently.
-
-``` bash
-nvm install 0.8
-```
-
-### Hexo
-
-Use [npm][3] to install.
-
-``` bash
-npm install -g hexo
-```
-
-[1]: http://nodejs.org/
-[2]: http://git-scm.com/
-[3]: http://npmjs.org/
-[4]: https://github.com/creationix/nvm
-[5]: http://mxcl.github.com/homebrew/
-[6]: http://www.macports.org/
-[7]: http://code.google.com/p/msysgit/
-[8]: http://code.google.com/p/git-osx-installer/
\ No newline at end of file
diff --git a/source/docs/installation.md b/source/docs/installation.md
new file mode 100644
index 0000000000..c5d604ce98
--- /dev/null
+++ b/source/docs/installation.md
@@ -0,0 +1,63 @@
+title: Installation
+prev: index
+next: setup
+---
+It only takes few minutes for you to get Hexo ready. If you encounter any problems on installation and you can't find the solution here. Please [submit an issue](https://github.com/tommy351/hexo/issues) and I'll try to solve your problems.
+
+## Requirements
+
+Installing Hexo is quite easy. However, there're something required before you get started.
+
+- [Node.js](http://nodejs.org/)
+- [Git](http://git-scm.com/)
+
+If your computer has been installed the requirements above already. Congratulations! Just install Hexo with npm.
+
+``` bash
+$ npm install -g hexo
+```
+
+If not, please follow the following instructions to install all the requirements.
+
+{% note warn For Mac users %}
+You may encounter some problems when compiling. Please install Xcode from App Store first. After Xcode is installed, open Xcode and go to **Preferences -> Download -> Command Line Tools -> Install** to install command line tools.
+{% endnote %}
+
+## 1. Install Git
+
+- Windows: Download & install [msysgit](http://code.google.com/p/msysgit/).
+- Mac: Install it with [Homebrew](http://mxcl.github.com/homebrew/), [MacPorts](http://www.macports.org/) or [installer](http://code.google.com/p/git-osx-installer/).
+- Linux (Ubuntu, Debian): `sudo apt-get install git-core`
+- Linux (Fedora, Red Hat, CentOS): `sudo yum install git-core`
+
+## 2. Install Node.js
+
+The best way to install Node.js is installing with [nvm](https://github.com/creationix/nvm).
+
+cURL:
+
+``` bash
+$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh
+```
+
+Wget:
+
+``` bash
+$ wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh
+```
+
+Once installed, restart the terminal and run the following command to install Node.js.
+
+``` bash
+$ nvm install 0.10
+```
+
+Or you can download the [installer](http://nodejs.org/) and install it.
+
+## 3. Install Hexo
+
+Once all the requirements are installed, you can install Hexo with npm.
+
+``` bash
+$ npm install -g hexo
+```
\ No newline at end of file
diff --git a/source/docs/migrate.md b/source/docs/migrate.md
deleted file mode 100644
index 98ff68bba9..0000000000
--- a/source/docs/migrate.md
+++ /dev/null
@@ -1,44 +0,0 @@
----
-layout: page
-title: Migrate
-date: 2012-11-15 18:13:30
----
-
-## Contents
-
-- [RSS](#rss)
-- [Jekyll / Octopress](#jekyll)
-- [WordPress](#wordpress)
-
-
-## RSS
-
-First, execute the following command to install RSS migrator plugin, and add `hexo-migrator-rss` in `plugins` field in `_config.yml`.
-
-``` plain
-npm install hexo-migrator-rss
-```
-
-After installed, execute the following command to migrate. `source` argument can be file path or URL.
-
- hexo migrate rss