|
2 | 2 | * @see https://vuepress.vuejs.org/zh/ |
3 | 3 | */ |
4 | 4 | module.exports = { |
5 | | - port: "4000", |
6 | | - dest: "dist", |
7 | | - base: "/linux-tutorial/", |
8 | | - title: "LINUX-TUTORIAL", |
9 | | - description: "数据库教程", |
10 | | - head: [["link", {rel: "icon", href: `/favicon.ico`}]], |
| 5 | + port: '4000', |
| 6 | + dest: 'dist', |
| 7 | + base: '/linux-tutorial/', |
| 8 | + title: 'LINUX-TUTORIAL', |
| 9 | + description: '数据库教程', |
| 10 | + head: [['link', { rel: 'icon', href: `/favicon.ico` }]], |
11 | 11 | markdown: { |
12 | 12 | externalLinks: { |
13 | | - target: "_blank", rel: "noopener noreferrer" |
14 | | - } |
| 13 | + target: '_blank', |
| 14 | + rel: 'noopener noreferrer', |
| 15 | + }, |
15 | 16 | }, |
16 | 17 | themeConfig: { |
17 | | - logo: "images/dunwu-logo-100.png", |
18 | | - repo: "dunwu/linux-tutorial", |
19 | | - repoLabel: "Github", |
| 18 | + logo: 'images/dunwu-logo-100.png', |
| 19 | + repo: 'dunwu/linux-tutorial', |
| 20 | + repoLabel: 'Github', |
| 21 | + docsDir: 'docs', |
| 22 | + docsBranch: 'master', |
20 | 23 | editLinks: true, |
21 | 24 | smoothScroll: true, |
22 | 25 | locales: { |
23 | | - "/": { |
24 | | - label: "简体中文", selectText: "Languages", editLinkText: "帮助我们改善此页面!", lastUpdated: "上次更新", nav: [{ |
25 | | - text: "Linux 命令", link: "/linux/cli/", |
26 | | - }, { |
27 | | - text: "Linux 运维", link: "/linux/ops/", |
28 | | - }, { |
29 | | - text: "Linux 软件运维", link: "/linux/soft/", |
30 | | - }, { |
31 | | - text: "Docker 教程", link: "/docker/", |
32 | | - }, { |
33 | | - text: "🎯 博客", link: "https://github.com/dunwu/blog", target: "_blank", rel: "" |
34 | | - }], sidebar: "auto", sidebarDepth: 2 |
35 | | - } |
36 | | - } |
| 26 | + '/': { |
| 27 | + label: '简体中文', |
| 28 | + selectText: 'Languages', |
| 29 | + editLinkText: '帮助我们改善此页面!', |
| 30 | + lastUpdated: '上次更新', |
| 31 | + nav: [ |
| 32 | + { |
| 33 | + text: 'Linux 命令', |
| 34 | + link: '/linux/cli/', |
| 35 | + }, |
| 36 | + { |
| 37 | + text: 'Linux 运维', |
| 38 | + link: '/linux/ops/', |
| 39 | + }, |
| 40 | + { |
| 41 | + text: 'Linux 软件运维', |
| 42 | + link: '/linux/soft/', |
| 43 | + }, |
| 44 | + { |
| 45 | + text: 'Docker 教程', |
| 46 | + link: '/docker/', |
| 47 | + }, |
| 48 | + { |
| 49 | + text: '🎯 博客', |
| 50 | + link: 'https://github.com/dunwu/blog', |
| 51 | + target: '_blank', |
| 52 | + rel: '', |
| 53 | + }, |
| 54 | + ], |
| 55 | + sidebar: 'auto', |
| 56 | + sidebarDepth: 2, |
| 57 | + }, |
| 58 | + }, |
37 | 59 | }, |
38 | | - plugins: [["@vuepress/back-to-top", true], ["@vuepress/pwa", { |
39 | | - serviceWorker: true, updatePopup: true |
40 | | - }], ["@vuepress/medium-zoom", true], ["container", { |
41 | | - type: "vue", before: '<pre class="vue-container"><code>', after: "</code></pre>" |
42 | | - }], ["container", { |
43 | | - type: "upgrade", before: info => `<UpgradePath title="${info}">`, after: "</UpgradePath>" |
44 | | - }], ["flowchart"]] |
45 | | -}; |
| 60 | + plugins: [ |
| 61 | + [ |
| 62 | + '@vuepress/active-header-links', |
| 63 | + { |
| 64 | + sidebarLinkSelector: '.sidebar-link', |
| 65 | + headerAnchorSelector: '.header-anchor', |
| 66 | + }, |
| 67 | + ], |
| 68 | + ['@vuepress/back-to-top', true], |
| 69 | + [ |
| 70 | + '@vuepress/pwa', |
| 71 | + { |
| 72 | + serviceWorker: true, |
| 73 | + updatePopup: true, |
| 74 | + }, |
| 75 | + ], |
| 76 | + [ |
| 77 | + '@vuepress/last-updated', |
| 78 | + { |
| 79 | + transformer: (timestamp, lang) => { |
| 80 | + // 不要忘了安装 moment |
| 81 | + const moment = require('moment') |
| 82 | + moment.locale(lang) |
| 83 | + return moment(timestamp).fromNow() |
| 84 | + }, |
| 85 | + }, |
| 86 | + ], |
| 87 | + ['@vuepress/medium-zoom', true], |
| 88 | + [ |
| 89 | + 'container', |
| 90 | + { |
| 91 | + type: 'vue', |
| 92 | + before: '<pre class="vue-container"><code>', |
| 93 | + after: '</code></pre>', |
| 94 | + }, |
| 95 | + ], |
| 96 | + [ |
| 97 | + 'container', |
| 98 | + { |
| 99 | + type: 'upgrade', |
| 100 | + before: (info) => `<UpgradePath title="${info}">`, |
| 101 | + after: '</UpgradePath>', |
| 102 | + }, |
| 103 | + ], |
| 104 | + ['flowchart'], |
| 105 | + ], |
| 106 | +} |
0 commit comments