Skip to content

Commit 41e4590

Browse files
committed
docs: @vuepress/plugin-last-updated
1 parent bf0b43a commit 41e4590

File tree

4 files changed

+85
-31
lines changed

4 files changed

+85
-31
lines changed

packages/@vuepress/plugin-last-updated/README.md

-31
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,3 @@
22

33
> last-updated plugin for vuepress
44
5-
> Note that this plugin has been included in the core.
6-
7-
## Usage
8-
9-
```js
10-
module.exports = {
11-
plugins: ['@vuepress/last-updated']
12-
}
13-
```
14-
15-
## Options
16-
17-
### transformer
18-
19-
- Type: `function`
20-
- Default: `undefined`
21-
22-
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.
23-
24-
``` javascript
25-
const timeago = require("timeago.js");
26-
27-
module.exports = {
28-
plugins: [
29-
[
30-
'last-updated',
31-
{ transformer: timeago.format }
32-
]
33-
]
34-
}
35-
```

packages/docs/docs/.vuepress/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ function getPluginSidebar (pluginTitle, pluginIntro, officialPluginTitle) {
132132
'official/plugin-pagination',
133133
'official/plugin-google-analytics',
134134
'official/plugin-i18n-ui',
135+
'official/plugin-last-updated',
135136
]
136137
}
137138
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# @vuepress/plugin-last-updated
2+
3+
> last-updated plugin for vuepress
4+
5+
> Note that this plugin has been included in the core.
6+
7+
## Install
8+
9+
```bash
10+
yarn add -D @vuepress/plugin-pagination
11+
# OR npm install -D @vuepress/plugin-pagination
12+
```
13+
14+
## Usage
15+
16+
```js
17+
module.exports = {
18+
plugins: ['@vuepress/last-updated']
19+
}
20+
```
21+
22+
## Options
23+
24+
### transformer
25+
26+
- Type: `function`
27+
- Default: `undefined`
28+
29+
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.
30+
31+
``` javascript
32+
const timeago = require("timeago.js");
33+
34+
module.exports = {
35+
plugins: [
36+
[
37+
'last-updated',
38+
{ transformer: timeago.format }
39+
]
40+
]
41+
}
42+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# @vuepress/plugin-last-updated
2+
3+
> last-updated plugin for vuepress
4+
5+
> Note that this plugin has been included in the core.
6+
7+
## Install
8+
9+
```bash
10+
yarn add -D @vuepress/plugin-pagination
11+
# OR npm install -D @vuepress/plugin-pagination
12+
```
13+
14+
## Usage
15+
16+
```js
17+
module.exports = {
18+
plugins: ['@vuepress/last-updated']
19+
}
20+
```
21+
22+
## Options
23+
24+
### transformer
25+
26+
- Type: `function`
27+
- Default: `undefined`
28+
29+
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.
30+
31+
``` javascript
32+
const timeago = require("timeago.js");
33+
34+
module.exports = {
35+
plugins: [
36+
[
37+
'last-updated',
38+
{ transformer: timeago.format }
39+
]
40+
]
41+
}
42+
```

0 commit comments

Comments
 (0)