|
2 | 2 | * @see https://vuepress.vuejs.org/zh/ |
3 | 3 | */ |
4 | 4 | module.exports = { |
5 | | - port: "4000", |
6 | | - dest: "dist", |
7 | | - base: "/java-tutorial/", |
8 | | - title: "JAVA-TUTORIAL", |
9 | | - description: "Java 教程", |
10 | | - head: [["link", {rel: "icon", href: `/favicon.ico`}]], |
| 5 | + port: '4000', |
| 6 | + dest: 'dist', |
| 7 | + base: '/java-tutorial/', |
| 8 | + title: 'JAVA-TUTORIAL', |
| 9 | + description: 'Java 教程', |
| 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/java-tutorial", |
19 | | - repoLabel: "Github", |
20 | | - docsDir: "docs", |
21 | | - docsBranch: "master", |
| 18 | + logo: 'https://raw.githubusercontent.com/dunwu/images/dev/common/dunwu-logo-200.png', |
| 19 | + repo: 'dunwu/java-tutorial', |
| 20 | + repoLabel: 'Github', |
| 21 | + docsDir: 'docs', |
| 22 | + docsBranch: 'master', |
22 | 23 | editLinks: true, |
23 | 24 | smoothScroll: true, |
24 | 25 | locales: { |
25 | | - "/": { |
26 | | - label: "简体中文", selectText: "Languages", editLinkText: "帮助我们改善此页面!", lastUpdated: "上次更新", nav: [{ |
27 | | - text: "工具", link: "/javatool/", items: [{ |
28 | | - text: "构建", link: "/javatool/build/" |
29 | | - }, { |
30 | | - text: "IDE", link: "/javatool/ide/" |
31 | | - }, { |
32 | | - text: "监控", link: "/javatool/monitor/" |
33 | | - }] |
34 | | - }, { |
35 | | - text: "JavaEE", link: "/javaee/" |
36 | | - }, { |
37 | | - text: "✨ Java系列", ariaLabel: "Java", items: [{ |
38 | | - text: "Java 教程 📚", link: "https://dunwu.github.io/java-tutorial/", target: "_blank", rel: "" |
39 | | - }, { |
40 | | - text: "JavaCore 教程 📚", link: "https://dunwu.github.io/javacore/", target: "_blank", rel: "" |
41 | | - }, { |
42 | | - text: "JavaTech 教程 📚", link: "https://dunwu.github.io/javatech/", target: "_blank", rel: "" |
43 | | - }, { |
44 | | - text: "Spring 教程 📚", link: "https://dunwu.github.io/spring-tutorial/", target: "_blank", rel: "" |
45 | | - }, { |
46 | | - text: "Spring Boot 教程 📚", link: "https://dunwu.github.io/spring-boot-tutorial/", target: "_blank", rel: "" |
47 | | - }] |
48 | | - }, { |
49 | | - text: "🎯 博客", link: "https://github.com/dunwu/blog", target: "_blank", rel: "" |
50 | | - }], sidebar: "auto", sidebarDepth: 2 |
51 | | - } |
52 | | - } |
| 26 | + '/': { |
| 27 | + label: '简体中文', |
| 28 | + selectText: 'Languages', |
| 29 | + editLinkText: '帮助我们改善此页面!', |
| 30 | + lastUpdated: '上次更新', |
| 31 | + nav: [ |
| 32 | + { |
| 33 | + text: '工具', |
| 34 | + link: '/javatool/', |
| 35 | + items: [ |
| 36 | + { |
| 37 | + text: '构建', |
| 38 | + link: '/javatool/build/', |
| 39 | + }, |
| 40 | + { |
| 41 | + text: 'IDE', |
| 42 | + link: '/javatool/ide/', |
| 43 | + }, |
| 44 | + { |
| 45 | + text: '监控', |
| 46 | + link: '/javatool/monitor/', |
| 47 | + }, |
| 48 | + ], |
| 49 | + }, |
| 50 | + { |
| 51 | + text: 'JavaEE', |
| 52 | + link: '/javaee/', |
| 53 | + }, |
| 54 | + { |
| 55 | + text: '✨ Java系列', |
| 56 | + ariaLabel: 'Java', |
| 57 | + items: [ |
| 58 | + { |
| 59 | + text: 'Java 教程 📚', |
| 60 | + link: 'https://dunwu.github.io/java-tutorial/', |
| 61 | + target: '_blank', |
| 62 | + rel: '', |
| 63 | + }, |
| 64 | + { |
| 65 | + text: 'JavaCore 教程 📚', |
| 66 | + link: 'https://dunwu.github.io/javacore/', |
| 67 | + target: '_blank', |
| 68 | + rel: '', |
| 69 | + }, |
| 70 | + { |
| 71 | + text: 'JavaTech 教程 📚', |
| 72 | + link: 'https://dunwu.github.io/javatech/', |
| 73 | + target: '_blank', |
| 74 | + rel: '', |
| 75 | + }, |
| 76 | + { |
| 77 | + text: 'Spring 教程 📚', |
| 78 | + link: 'https://dunwu.github.io/spring-tutorial/', |
| 79 | + target: '_blank', |
| 80 | + rel: '', |
| 81 | + }, |
| 82 | + { |
| 83 | + text: 'Spring Boot 教程 📚', |
| 84 | + link: 'https://dunwu.github.io/spring-boot-tutorial/', |
| 85 | + target: '_blank', |
| 86 | + rel: '', |
| 87 | + }, |
| 88 | + ], |
| 89 | + }, |
| 90 | + { |
| 91 | + text: '🎯 博客', |
| 92 | + link: 'https://github.com/dunwu/blog', |
| 93 | + target: '_blank', |
| 94 | + rel: '', |
| 95 | + }, |
| 96 | + ], |
| 97 | + sidebar: 'auto', |
| 98 | + sidebarDepth: 2, |
| 99 | + }, |
| 100 | + }, |
53 | 101 | }, |
54 | | - plugins: [["@vuepress/active-header-links", { |
55 | | - sidebarLinkSelector: ".sidebar-link", headerAnchorSelector: ".header-anchor" |
56 | | - }], ["@vuepress/back-to-top", true], ["@vuepress/pwa", { |
57 | | - serviceWorker: true, updatePopup: true |
58 | | - }], ["@vuepress/medium-zoom", true], ["container", { |
59 | | - type: "vue", before: '<pre class="vue-container"><code>', after: "</code></pre>" |
60 | | - }], ["container", { |
61 | | - type: "upgrade", before: info => `<UpgradePath title="${info}">`, after: "</UpgradePath>" |
62 | | - }], ["flowchart"]] |
63 | | -}; |
| 102 | + plugins: [ |
| 103 | + [ |
| 104 | + '@vuepress/active-header-links', |
| 105 | + { |
| 106 | + sidebarLinkSelector: '.sidebar-link', |
| 107 | + headerAnchorSelector: '.header-anchor', |
| 108 | + }, |
| 109 | + ], |
| 110 | + ['@vuepress/back-to-top', true], |
| 111 | + [ |
| 112 | + '@vuepress/pwa', |
| 113 | + { |
| 114 | + serviceWorker: true, |
| 115 | + updatePopup: true, |
| 116 | + }, |
| 117 | + ], |
| 118 | + [ |
| 119 | + '@vuepress/last-updated', |
| 120 | + { |
| 121 | + transformer: (timestamp, lang) => { |
| 122 | + // 不要忘了安装 moment |
| 123 | + const moment = require('moment') |
| 124 | + moment.locale(lang) |
| 125 | + return moment(timestamp).fromNow() |
| 126 | + }, |
| 127 | + }, |
| 128 | + ], |
| 129 | + ['@vuepress/medium-zoom', true], |
| 130 | + [ |
| 131 | + 'container', |
| 132 | + { |
| 133 | + type: 'vue', |
| 134 | + before: '<pre class="vue-container"><code>', |
| 135 | + after: '</code></pre>', |
| 136 | + }, |
| 137 | + ], |
| 138 | + [ |
| 139 | + 'container', |
| 140 | + { |
| 141 | + type: 'upgrade', |
| 142 | + before: (info) => `<UpgradePath title="${info}">`, |
| 143 | + after: '</UpgradePath>', |
| 144 | + }, |
| 145 | + ], |
| 146 | + ['flowchart'], |
| 147 | + ], |
| 148 | +} |
0 commit comments