Commit 7e1833b7 authored by Sparkf's avatar Sparkf 🏙️
Browse files

add plugin: @vuepress/last-updated

parent f234536c
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -10,14 +10,31 @@ module.exports = {
    '@vuepress/google-analytics',
    {
      'ga': 'UA-169618277-1' // UA-00000000-0
    }
  ]
    },
  ],
  [
    '@vuepress/last-updated',
      {
        transformer: (timestamp, lang) => {
          // 不要忘了安装 moment
          const moment = require('moment')
          moment.locale(lang)
          return moment(timestamp).fromNow()
        },
      },
  ],
],
  themeConfig: {
  nav: [
    { text: '主页', link: '/' },
    { text: '关于', link: '/about/' },
  ],
  repo: 'sustc/sustech-online-ng',
  docsRepo: 'sustc/sustech-online-ng',
  editLinkText: '一起完善这本手册!',
  docsDir: 'docs',
  repoLabel: 'Source Code',
  editLinks: true,
  sidebarDepth: 2,
  sidebar: {
    '/': [
+3 −0
Original line number Diff line number Diff line
@@ -6,5 +6,8 @@
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  },
  "dependencies": {
    "moment": "^2.26.0"
  }
}