fix: 修正lastupdate中时间UTF-8显示

This commit is contained in:
ZiuChen 2022-08-16 20:03:44 +08:00
parent 5f920bdfc1
commit 3c65787658

View File

@ -1,13 +1,18 @@
import { defineConfig } from 'vuepress/config' module.exports = {
export default defineConfig({
title: 'ZiuChen', title: 'ZiuChen',
description: 'Unlimited Progress.', description: 'Unlimited Progress.',
head: [['link', { rel: 'icon', href: '/logo.png' }]], head: [['link', { rel: 'icon', href: '/logo.png' }]],
plugins: [ plugins: [
'@vuepress/medium-zoom', '@vuepress/medium-zoom',
'@vuepress/active-header-links', '@vuepress/active-header-links',
'@vuepress/plugin-back-to-top' '@vuepress/plugin-back-to-top',
'@vuepress/last-updated',
{
transformer: (timestamp) => {
const d = new Date(timestamp)
return d.toLocaleDateString() + d.toLocaleTimeString()
}
}
], ],
themeConfig: { themeConfig: {
nav: [ nav: [
@ -52,4 +57,4 @@ export default defineConfig({
docsDir: 'docs', docsDir: 'docs',
lastUpdated: 'Last Updated' lastUpdated: 'Last Updated'
} }
}) }