Skip to content

Commit

Permalink
Update English doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Feb 26, 2015
1 parent 80d99f7 commit 2e6d4ce
Show file tree
Hide file tree
Showing 55 changed files with 1,121 additions and 2,096 deletions.
2 changes: 1 addition & 1 deletion source/_data/menu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docs: /docs/
api: /api/
# api: /api/
news: /news/
plugins: /plugins/
themes: /themes/
19 changes: 19 additions & 0 deletions source/docs/asset-folders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: Asset Folders
---
Assets are non-post files in `source` folder, such as images, CSS or JavaScript files. Hexo provides a more convenient way to manage assets. To enable this, modify `post_asset_folder` setting.

``` yaml
post_asset_folder: true
```
Once `post_asset_folder` setting is enabled, Hexo will create a folder with the same name as the new post. You can put all assets related to the post into the folder. So that you can use them more easily.

## Tag Plugins

Several tag plugins are added in Hexo 3 for you to include assets in posts more easily.

```
{% asset_path slug %}
{% asset_img slug %}
{% asset_link slug [title] %}
```
7 changes: 0 additions & 7 deletions source/docs/cli-clean.md

This file was deleted.

27 changes: 0 additions & 27 deletions source/docs/cli-config.md

This file was deleted.

144 changes: 0 additions & 144 deletions source/docs/cli-deploy.md

This file was deleted.

24 changes: 0 additions & 24 deletions source/docs/cli-generate.md

This file was deleted.

29 changes: 16 additions & 13 deletions source/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ $ hexo new [layout] <title>

Creates a new article. If `layout` isn't defined, it'll equal the `default_layout` setting in [_config.yml](configuration.html). If the title is more than one word, wrap it with quotation marks.

**Alias:** n

## generate

``` bash
Expand All @@ -26,8 +24,6 @@ $ hexo generate

Generates static files.

**Alias**: g

Option | Description
--- | ---
`-d`, `--deploy` | Deploy after generate done
Expand All @@ -41,8 +37,6 @@ $ hexo publish [layout] <filename>

Publishes a draft.

**Alias**: p

## server

``` bash
Expand All @@ -51,14 +45,11 @@ $ hexo server

Starts server.

**Alias:** s

Option | Description
--- | ---
`-p`, `--port` | Override default port
`-s`, `--static` | Only serve static files
`-l`, `--log` | Enable logger. Override logger format.
`-d`, `--drafts` | Serve drafts as normal posts.

## deploy

Expand All @@ -68,13 +59,9 @@ $ hexo deploy

Deploys your website.

**Alias:** d

Option | Description
--- | ---
`--setup` | Setup without deployment
`-g`, `--generate` | Generate before deployment
`-m`, `--message` | Customize commit message

## render

Expand Down Expand Up @@ -153,3 +140,19 @@ $ hexo --config custom.yml
```

Customize config file path instead of `_config.yml`.

### Display drafts

``` bash
$ hexo --draft
```

Display draft posts in `source/_drafts` folder.

### Customize CWD

``` bash
$ hexo --cwd /path/to/cwd
```

Customize the path of current working directory.
6 changes: 2 additions & 4 deletions source/docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
title: Configuration
---
You can modify most options in `_config.yml`.

## Configuration
You can modify most settings in `_config.yml`.

### Site

Expand Down Expand Up @@ -51,7 +49,7 @@ Setting | Description | Default
`external_link` | Open external links in new tab | true
`filename_case` | Transform filename into (1) lower case or (2) upper case | 0
`render_drafts` | Display drafts | false
`post_asset_folder` | Enables [Asset Folder](writing.html#Asset_Folder) | false
`post_asset_folder` | Enables [Asset Folder](asset-folders.html) | false
`relative_link` | Make links relative to root folder | false
`future` | Display future posts | true
`highlight` | Code block settings |
Expand Down
Loading

0 comments on commit 2e6d4ce

Please sign in to comment.