Skip to content

Commit

Permalink
Merge pull request #1328 from weakish/patch-5
Browse files Browse the repository at this point in the history
Readme_zh-cn.md: Complete translation in `block prepend/apend`
  • Loading branch information
ForbesLindesay committed Dec 11, 2013
2 parents b845304 + 541ac82 commit eb08ab7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Readme_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,11 @@ block content
```

<a name="a12"/>
## Block append / prepend

Jade allows you to _replace_ (default), _prepend_, or _append_ blocks. Suppose for example you have default scripts in a "head" block that you wish to utilize on _every_ page, you might do this:
## 前置、追加代码块

Jade允许你 _替换_ (默认)、 _前置__追加_ blocks. 比如,假设你希望在 _所有_ 页面的头部都加上默认的脚本,你可以这么做:


```jade
html
Expand All @@ -920,7 +922,8 @@ html
block content
```

Now suppose you have a page of your application for a JavaScript game, you want some game related scripts as well as these defaults, you can simply `append` the block:
现在假设你有一个Javascript游戏的页面,你希望在默认的脚本之外添加一些游戏相关的脚本,你可以直接`append`上代码块:


```jade
extends layout
Expand Down

0 comments on commit eb08ab7

Please sign in to comment.