Skip to content

Commit

Permalink
doc(quickstart): more semantic and moment installation (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkindey authored and atian25 committed Mar 3, 2018
1 parent 951e236 commit b55e908
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions docs/source/en/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ This usually goes to the app/view directory.
<link rel="stylesheet" href="/public/css/news.css" />
</head>
<body>
<div class="news-view view">
<ul class="news-view view">
{% for item in list %}
<div class="item">
<li class="item">
<a href="{{ item.url }}">{{ item.title }}</a>
</div>
</li>
{% endfor %}
</div>
</ul>
</body>
</html>
```
Expand Down Expand Up @@ -329,6 +329,10 @@ For more information, cf. [Extensions](../basics/extend.md).

In the case of view, we can just write a helper as an extension.

```bash
$ npm i moment --save
```

```js
// app/extend/helper.js
const moment = require('moment');
Expand Down
12 changes: 8 additions & 4 deletions docs/source/zh-cn/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ exports.view = {
<link rel="stylesheet" href="/public/css/news.css" />
</head>
<body>
<div class="news-view view">
<ul class="news-view view">
{% for item in list %}
<div class="item">
<li class="item">
<a href="{{ item.url }}">{{ item.title }}</a>
</div>
</li>
{% endfor %}
</div>
</ul>
</body>
</html>
```
Expand Down Expand Up @@ -306,6 +306,10 @@ exports.news = {

在这里,我们可以使用 View 插件支持的 Helper 来实现:

```bash
$ npm i moment --save
```

```js
// app/extend/helper.js
const moment = require('moment');
Expand Down

0 comments on commit b55e908

Please sign in to comment.