Commit 3c9086f4 authored by Sparkf's avatar Sparkf 🏙️
Browse files

fix transport and calendar page, add index search plugin

parent e66368e6
Loading
Loading
Loading
Loading
+75 −18
Original line number Diff line number Diff line
@@ -44,6 +44,19 @@ module.exports = {
    ['link', { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.jsdelivr.net/npm/datatables@1.10.18/media/css/jquery.dataTables.min.css' }]
  ],
  plugins: [
    [
      '@vuepress/plugin-search',
      {
        locales: {
          '/': {
            placeholder: 'Search',
          },
          '/zh/': {
            placeholder: '搜索',
          },
        },
      },
    ],
    // [
    //   '@vuepress/google-analytics',
    //   {
@@ -106,37 +119,81 @@ module.exports = {
      '/facility/',
      '/contact/',
      {
        title: '📅校历',   // 必要的
        path: '/calendar/',      // 可选的, 标题的跳转链接,应为绝对路径且必须存在
        // collapsable: false, // 可选的, 默认值是 true,
        sidebarDepth: 1,    // 可选的, 默认值是 1
        text: '📅校历',
        link: '/calendar/',
        children: [
          ['/calendar/', '2020-2021 学年'],
          // SidebarItem
          {
            title: '历史校历(存档)',
            text: '历史校历(存档)',
            children: [
              ['/calendar/2021-2022.md', '2021-2022 学年'],
              ['/calendar/2020-2021.md', '2020-2021 学年'],
              ['/calendar/2019-2020.md', '2019-2020 学年'],
              ['/calendar/2018-2019.md', '2018-2019 学年'],
              {
                text: '2021-2022 学年',
                link: '/calendar/2021-2022.md',
                children: [],
              },
              {
                text: '2020-2021 学年',
                link: '/calendar/2020-2021.md',
                children: [],
              },
            ]
          }
          },
        ],
      },
      // {
      //   title: '📅校历',   // 必要的
      //   path: '/calendar/',      // 可选的, 标题的跳转链接,应为绝对路径且必须存在
      //   // collapsable: false, // 可选的, 默认值是 true,
      //   sidebarDepth: 1,    // 可选的, 默认值是 1
      //   children: [
      //     ['/calendar/', '2020-2021 学年'],
      //     {
      //       title: '历史校历(存档)',
      //       children: [
      //         ['/calendar/2021-2022.md', '2021-2022 学年'],
      //         ['/calendar/2020-2021.md', '2020-2021 学年'],
      //         ['/calendar/2019-2020.md', '2019-2020 学年'],
      //         ['/calendar/2018-2019.md', '2018-2019 学年'],
      //       ]
      //     }
      //   ],
      // },
      '/service/',
      '/life/',
      '/study/',
      '/organizations/',
      '/media/',
      // {
      //   title: '🚄交通',   // 必要的
      //   path: '/transport/',      // 可选的, 标题的跳转链接,应为绝对路径且必须存在
      //   // collapsable: false, // 可选的, 默认值是 true,
      //   sidebarDepth: 1,    // 可选的, 默认值是 1
      //   children: [
      //     ['/transport/workday.md', '🚌校园巴士-工作日'],
      //     ['/transport/holiday.md', '🚌校园巴士-节假日'],
      //     ['/transport/', '周围交通'],
      //   ],
      // },
      {
        title: '🚄交通',   // 必要的
        path: '/transport/',      // 可选的, 标题的跳转链接,应为绝对路径且必须存在
        // collapsable: false, // 可选的, 默认值是 true,
        sidebarDepth: 1,    // 可选的, 默认值是 1
        text: '🚄交通',
        link: '/transport/',
        children: [
          ['/transport/workday.md', '🚌校园巴士-工作日'],
          ['/transport/holiday.md', '🚌校园巴士-节假日'],
          ['/transport/', '周围交通'],
          // SidebarItem
          {
            text: '🚌校园巴士-工作日',
            link: '/transport/workday.md',
            children: [],
          },
          {
            text: '🚌校园巴士-节假日',
            link: '/transport/holiday.md',
            children: [],
          },
          {
            text: '周围交通',
            link: '/transport/',
            children: [],
          },
        ],
      },      
      '/surroundings/',
+3 −0
Original line number Diff line number Diff line
@@ -5,5 +5,8 @@
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  },
  "dependencies": {
    "@vuepress/plugin-search": "2.0.0-beta.20"
  }
}
+13 −0
Original line number Diff line number Diff line
@@ -475,6 +475,19 @@
    "@vuepress/core" "2.0.0-beta.20"
    prismjs "^1.23.0"

"@vuepress/plugin-search@2.0.0-beta.20":
  version "2.0.0-beta.20"
  resolved "https://registry.nlark.com/@vuepress/plugin-search/download/@vuepress/plugin-search-2.0.0-beta.20.tgz#7ac1b3818b4b7d5a36bbc11b0c3439b2d3a116b2"
  integrity sha1-esGzgYtLfVo2u8EbDDQ5stOhFrI=
  dependencies:
    "@vuepress/client" "2.0.0-beta.20"
    "@vuepress/core" "2.0.0-beta.20"
    "@vuepress/shared" "2.0.0-beta.20"
    "@vuepress/utils" "2.0.0-beta.20"
    chokidar "^3.5.2"
    vue "^3.1.2"
    vue-router "^4.0.10"

"@vuepress/plugin-theme-data@2.0.0-beta.20":
  version "2.0.0-beta.20"
  resolved "https://registry.nlark.com/@vuepress/plugin-theme-data/download/@vuepress/plugin-theme-data-2.0.0-beta.20.tgz#a189d75fb2f15d08e169a81bcdf03a680d6b563a"