Add "Last Updated Timestamp"
Edit config.mjs
We will be adding code inside this:
/.vitepress/config.mjs
mjs
import { defineConfig } from "vitepress";
export default defineConfig({
// ==> Inside Here <==
});1
2
3
4
5
2
3
4
5
Just add a lastUpdated prop inside the defaultConfig.
/.vitepress/config.mjs
mjs
import { defineConfig } from "vitepress";
export default defineConfig({
lastUpdated: true
});1
2
3
4
5
2
3
4
5
Edit package.json
package.json
json
{
"name": "naughty_docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "vitepress dev --host",
"build": "vitepress build",
"build": "git fetch --unshallow && vitepress build",
"preview": "vitepress preview --host"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"devDependencies": {
"vitepress": "^2.0.0-alpha.15"
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Thats all. Set Up and forget about it.