Skip to content

Commit

Permalink
docs: @vuepress/plugin-last-updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 2, 2018
1 parent bf0b43a commit 41e4590
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 31 deletions.
31 changes: 0 additions & 31 deletions packages/@vuepress/plugin-last-updated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,3 @@

> last-updated plugin for vuepress
> Note that this plugin has been included in the core.
## Usage

```js
module.exports = {
plugins: ['@vuepress/last-updated']
}
```

## Options

### transformer

- Type: `function`
- Default: `undefined`

By default, this plugin produces a 13-bit timestamp for each page, you can also pass in a transformer to convert it to any format that you want.

``` javascript
const timeago = require("timeago.js");

module.exports = {
plugins: [
[
'last-updated',
{ transformer: timeago.format }
]
]
}
```
1 change: 1 addition & 0 deletions packages/docs/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function getPluginSidebar (pluginTitle, pluginIntro, officialPluginTitle) {
'official/plugin-pagination',
'official/plugin-google-analytics',
'official/plugin-i18n-ui',
'official/plugin-last-updated',
]
}
]
Expand Down
42 changes: 42 additions & 0 deletions packages/docs/docs/plugin/official/plugin-last-updated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @vuepress/plugin-last-updated

> last-updated plugin for vuepress
> Note that this plugin has been included in the core.
## Install

```bash
yarn add -D @vuepress/plugin-pagination
# OR npm install -D @vuepress/plugin-pagination
```

## Usage

```js
module.exports = {
plugins: ['@vuepress/last-updated']
}
```

## Options

### transformer

- Type: `function`
- Default: `undefined`

By default, this plugin produces a 13-bit timestamp for each page, you can also pass in a transformer to convert it to any format that you want.

``` javascript
const timeago = require("timeago.js");

module.exports = {
plugins: [
[
'last-updated',
{ transformer: timeago.format }
]
]
}
```
42 changes: 42 additions & 0 deletions packages/docs/docs/zh/plugin/official/plugin-last-updated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @vuepress/plugin-last-updated

> last-updated plugin for vuepress
> Note that this plugin has been included in the core.
## Install

```bash
yarn add -D @vuepress/plugin-pagination
# OR npm install -D @vuepress/plugin-pagination
```

## Usage

```js
module.exports = {
plugins: ['@vuepress/last-updated']
}
```

## Options

### transformer

- Type: `function`
- Default: `undefined`

By default, this plugin produces a 13-bit timestamp for each page, you can also pass in a transformer to convert it to any format that you want.

``` javascript
const timeago = require("timeago.js");

module.exports = {
plugins: [
[
'last-updated',
{ transformer: timeago.format }
]
]
}
```

0 comments on commit 41e4590

Please sign in to comment.