Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed May 12, 2014
1 parent 5bdcca3 commit d30ec40
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
16 changes: 1 addition & 15 deletions source/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,14 @@ Setting | Description
--- | ---
`theme` | Current theme
`exclude_generator` | Disabled generators (archive, category, home, page, post, tag)
`markdown` | Markdown settings (See [marked](https://github.com/chjj/marked) for more info)
`stylus` | Stylus settings

{% note warn YAML format %}
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
``` yaml package.json
title: Hexo
subtitle:
description:
Expand Down Expand Up @@ -160,18 +158,6 @@ disqus_shortname:
theme: light
exclude_generator:

markdown:
gfm: true
pedantic: false
sanitize: false
tables: true
breaks: true
smartLists: true
smartypants: true

stylus:
compress: false

deploy:
type:
```
10 changes: 4 additions & 6 deletions source/docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@ To use script, put JavaScript files in `scripts` folder and it'll be loaded once

### Plugin

To use plugin, create a new folder. The folder name must `hexo-` prefixed so it could be loaded by Hexo. The folder must contained 2 files at least. One is your code and the other is `package.json`.
To use plugin, create a new folder. The folder name must be started with `hexo-` so it could be loaded by Hexo. The folder must contained 2 files at least. One is your code and the other is `package.json`.

``` plain
.
├── index.js
└── package.json
```

You should at least describe `name`, `version`, `main` and `dependencies` in `package.json`. For example:
You should at least describe `name`, `version`, `main` in `package.json`. For example:

``` json
``` json package.json
{
"name": "hexo-my-plugin",
"version": "0.0.1",
"main": "index",
"dependencies": {
}
"main": "index"
}
```

Expand Down
16 changes: 11 additions & 5 deletions source/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Once Hexo is installed, run the following command and hexo will build all files

``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

After build, here's how the folder looks like:
Expand All @@ -26,14 +28,18 @@ Site [configuration](configuration.html) file. You can configure most of options

### package.json

Application data. If you deleted it unfortunately, rebuild the file with the following content.
Application data. EJS, Stylus and Markdown renderer are installed by default, you can uninstall them later.

``` json
``` json package.json
{
"name": "hexo",
"version": "0.0.1",
"name": "hexo-site",
"version": "",
"private": true,
"dependencies": {}
"dependencies": {
"hexo-renderer-ejs": "*",
"hexo-renderer-stylus": "*",
"hexo-renderer-marked": "*"
}
}
```

Expand Down

0 comments on commit d30ec40

Please sign in to comment.