Skip to content

Commit

Permalink
feat: update vuepress
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzm committed Oct 24, 2024
1 parent 443639f commit 6f2539f
Show file tree
Hide file tree
Showing 3 changed files with 8,436 additions and 3,889 deletions.
186 changes: 95 additions & 91 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { defaultTheme } from 'vuepress';
import { searchPlugin } from '@vuepress/plugin-search';
import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'

let statcounter = [];

Expand All @@ -12,17 +14,89 @@ if (process.env.NODE_ENV === 'production') {
["script", { src: "https://www.statcounter.com/counter/counter.js", async: true }]];
}


export default {
plugins: [
searchPlugin({
// 配置项
'/zh/': {
placeholder: '搜索',
},
}),
],
base: "/minigame-canvas-engine/",
export default defineUserConfig({
bundler: viteBundler(),
theme: defaultTheme(
{
logo: '/imgs/logo.png',
contributors: false,
repo: 'wechat-miniprogram/minigame-canvas-engine',
lastUpdated: true,
lastUpdatedText: '上次更新', // string | boolean
sidebarDepth: 1,
sidebar: [
// SidebarItem
{
text: '概览', // 必要的
link: '/',
},
{
text: '安装使用',
link: '/overview/guide',
children: [
'/overview/guide',
'/overview/plugin.md'
],
},
{
text: '教程',
link: '/tutorial/cocos2.x',
children: [
'/tutorial/cocos2.x',
'/tutorial/loading',
'/tutorial/platform',
'/tutorial/templateengine',
'/api/tween',
'/tutorial/updateViewPort',
],
},
{
text: '更多示例',
link: '/demos/invite',
children: [
'/demos/invite',
'/demos/rank'
],
},
{
text: 'API 文档',
link: '/api/api',
children: [
'/api/api',
'/components/overview.md',
{
text: '组件',
link: '/components/element.md',
collapsible: false,
children: [
'/components/element.md',
'/components/view.md',
'/components/image.md',
'/components/text.md',
// '/components/button.md',
'/components/bitmapfont.md',
'/components/canvas.md',
'/components/scrollview.md',
]
},
// '/api/tween',
],
},
{
text: '插件机制',
link: '/plugin/guide',
children: [
'/plugin/guide',
'/plugin/richtext'
],
},
{
text: '更新日志',
link: '/CHANGELOG',
}
],
}
),
description: '轻量级canvas渲染引擎',
head: [
// meta
Expand All @@ -31,83 +105,13 @@ export default {
["meta", { name: "keywords", content: "minigame-canvans-engine, minigame, canvas, engine, game engine" }],
['link', { rel: 'shortcut icon', type: "image/x-icon", href: `./imgs/favicon.ico` }]
].concat(statcounter),
theme: defaultTheme({
logo: '/imgs/logo.png',
contributors: false,
repo: 'wechat-miniprogram/minigame-canvas-engine',
lastUpdated: true,
lastUpdatedText: '上次更新', // string | boolean
sidebarDepth: 1,
sidebar: [
// SidebarItem
{
text: '概览', // 必要的
link: '/',
},
{
text: '安装使用',
link: '/overview/guide',
children: [
'/overview/guide',
'/overview/plugin.md'
],
},
{
text: '教程',
link: '/tutorial/cocos2.x',
children: [
'/tutorial/cocos2.x',
'/tutorial/loading',
'/tutorial/platform',
'/tutorial/templateengine',
'/api/tween',
'/tutorial/updateViewPort',
],
},
{
text: '更多示例',
link: '/demos/invite',
children: [
'/demos/invite',
'/demos/rank'
],
},
{
text: 'API 文档',
link: '/api/api',
children: [
'/api/api',
'/components/overview.md',
{
text: '组件',
link: '/components/element.md',
collapsible: false,
children: [
'/components/element.md',
'/components/view.md',
'/components/image.md',
'/components/text.md',
// '/components/button.md',
'/components/bitmapfont.md',
'/components/canvas.md',
'/components/scrollview.md',
]
},
// '/api/tween',
],
},
{
text: '插件机制',
link: '/plugin/guide',
children: [
'/plugin/guide',
'/plugin/richtext'
],
base: "/minigame-canvas-engine/",
plugins: [
searchPlugin({
// 配置项
'/zh/': {
placeholder: '搜索',
},
{
text: '更新日志',
link: '/CHANGELOG',
}
],
})
}
}),
],
})
Loading

0 comments on commit 6f2539f

Please sign in to comment.