|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | + |
| 3 | +// https://vitepress.dev/reference/site-config |
| 4 | +export default defineConfig({ |
| 5 | + title: "Layout", |
| 6 | + description: "轻量级 Canvas2d 渲染引擎", |
| 7 | + base: "/minigame-canvas-engine/", |
| 8 | + head: [ |
| 9 | + // meta |
| 10 | + ["meta", { name: "robots", content: "all" }], |
| 11 | + ["meta", { name: "author", content: "yuanzm" }], |
| 12 | + ["meta", { name: "keywords", content: "minigame-canvans-engine, minigame, canvas, engine, game engine" }], |
| 13 | + ['link', { rel: 'shortcut icon', type: "image/x-icon", href: `./imgs/favicon.ico` }], |
| 14 | + // [ |
| 15 | + // 'script', |
| 16 | + // { id: 'statcounter' }, |
| 17 | + // ` |
| 18 | + // var sc_project=12873270; |
| 19 | + // var sc_invisible=1; |
| 20 | + // var sc_security="efed24b4"; |
| 21 | + // ` |
| 22 | + // ], |
| 23 | + // ["script", { src: "https://www.statcounter.com/counter/counter.js", async: "true" }] |
| 24 | + ], |
| 25 | + |
| 26 | + |
| 27 | + themeConfig: { |
| 28 | + search: { |
| 29 | + provider: 'local', |
| 30 | + options: { |
| 31 | + translations: { |
| 32 | + button: { |
| 33 | + buttonText: '搜索', |
| 34 | + buttonAriaLabel: '搜索' |
| 35 | + }, |
| 36 | + modal: { |
| 37 | + displayDetails: '显示详细列表', |
| 38 | + resetButtonTitle: '重置搜索', |
| 39 | + backButtonTitle: '关闭搜索', |
| 40 | + noResultsText: '没有结果', |
| 41 | + footer: { |
| 42 | + selectText: '选择', |
| 43 | + selectKeyAriaLabel: '输入', |
| 44 | + navigateText: '导航', |
| 45 | + navigateUpKeyAriaLabel: '上箭头', |
| 46 | + navigateDownKeyAriaLabel: '下箭头', |
| 47 | + closeText: '关闭', |
| 48 | + closeKeyAriaLabel: 'esc' |
| 49 | + } |
| 50 | + } |
| 51 | + }, |
| 52 | + } |
| 53 | + }, |
| 54 | + lastUpdated: { |
| 55 | + text: '上次更新', |
| 56 | + formatOptions: { |
| 57 | + dateStyle: 'full', |
| 58 | + timeStyle: 'medium' |
| 59 | + } |
| 60 | + }, |
| 61 | + outline: { |
| 62 | + label: '页面导航' |
| 63 | + }, |
| 64 | + // https://vitepress.dev/reference/default-theme-config |
| 65 | + nav: [ |
| 66 | + { |
| 67 | + text: "微信小游戏官方文档", |
| 68 | + link: "https://developers.weixin.qq.com/minigame/dev/guide/", |
| 69 | + }, |
| 70 | + ], |
| 71 | + |
| 72 | + sidebar: [ |
| 73 | + { |
| 74 | + text: "概览", |
| 75 | + link: "/index" |
| 76 | + }, |
| 77 | + |
| 78 | + { |
| 79 | + text: "安装使用", |
| 80 | + link: '/overview/guide', |
| 81 | + items: [ |
| 82 | + { text: '快速入门', link: '/overview/guide'}, |
| 83 | + { text: '微信小游戏插件', link: '/overview/plugin'} |
| 84 | + ] |
| 85 | + }, |
| 86 | + { |
| 87 | + text: '教程', |
| 88 | + link: '/tutorial/cocos2.x', |
| 89 | + items: [ |
| 90 | + { text: '模板引擎使用', link: '/tutorial/templateengine'}, |
| 91 | + { text: 'cocos2.x版本适配', link: '/tutorial/cocos2.x'}, |
| 92 | + { text: '加载中效果实现', link: '/tutorial/loading'}, |
| 93 | + { text: '平台适配', link: '/tutorial/platform'}, |
| 94 | + { text: '缓动系统', link: '/api/tween'}, |
| 95 | + ], |
| 96 | + }, |
| 97 | + { |
| 98 | + text: '更多示例', |
| 99 | + link:'/demos/invite', |
| 100 | + items: [ |
| 101 | + { text: '邀请好友组件', link: '/demos/invite'}, |
| 102 | + { text: '好有排行榜', link: '/demos/rank'}, |
| 103 | + ], |
| 104 | + }, |
| 105 | + { |
| 106 | + text: 'API 文档', |
| 107 | + link: '/api/api', |
| 108 | + items: [ |
| 109 | + { text: 'Layout', link: '/api/api', }, |
| 110 | + { text: '布局和样式', link: '/components/overview.md', }, |
| 111 | + { |
| 112 | + text: '组件', |
| 113 | + link: '/components/element.md', |
| 114 | + items: [ |
| 115 | + { text: 'Element', link: '/components/element.md', }, |
| 116 | + { text: 'View', link: '/components/view.md', }, |
| 117 | + { text: 'Image', link: '/components/image.md', }, |
| 118 | + { text: 'Text', link: '/components/text.md', }, |
| 119 | + { text: 'BitmapText', link: '/components/bitmapfont.md', }, |
| 120 | + { text: 'Canvas', link: '/components/canvas.md', }, |
| 121 | + { text: 'ScrollView', link: '/components/scrollview.md', }, |
| 122 | + ] |
| 123 | + }, |
| 124 | + ], |
| 125 | + }, |
| 126 | + { |
| 127 | + text: '插件机制', |
| 128 | + link: '/plugin/guide', |
| 129 | + items: [ |
| 130 | + { text: '概览', link: '/plugin/guide', }, |
| 131 | + { text: '富文本插件', link: '/plugin/richtext'} |
| 132 | + ], |
| 133 | + }, |
| 134 | + { |
| 135 | + text: '更新日志', |
| 136 | + link: '/CHANGELOG', |
| 137 | + } |
| 138 | + ], |
| 139 | + |
| 140 | + socialLinks: [ |
| 141 | + { icon: 'github', link: 'https://github.com/vuejs/vitepress' } |
| 142 | + ] |
| 143 | + } |
| 144 | +}) |
0 commit comments