diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f7bdba1ad250baa53f31a5fedc1df8f5a0d4d044..08d49af9cb8a79ed5ed69b06dff753340bd71f08 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -79,7 +79,19 @@ module.exports = { hostname: "https://dev-cloud.gitcode.host/spring/", // 排除无实际内容的页面 exclude: ["/404.html"] - }] + }], + [ + '@vuepress/last-updated', + { + transformer: (timestamp, lang) => { + //return (new Date(timestamp)).toUTCString() 或者用下面这段 + // 不要忘了安装 moment + const moment = require('moment') + moment.locale(lang) + return moment(timestamp).toString() + } + } + ] ], themeConfig: { repo: "https://gitcode.net/dev-cloud/spring", diff --git a/package.json b/package.json index 365678bcecfbdcba5520d3535e94f3215f6b7071..697b42cdf9832e0c84fd5344bf78d79d4a777b73 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "vuepress-plugin-autometa": "^0.1.13" }, "dependencies": { + "moment": "^2.29.1", "vuepress-plugin-sitemap": "^2.3.1" } }