From 88c62cebf18e714a43781cb43651ffb58351059d Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 28 Aug 2023 15:59:36 +0800 Subject: update doc. --- doc/docs/.vuepress/config.js | 78 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 17 deletions(-) (limited to 'doc/docs/.vuepress') diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js index bd89428..70ea66a 100755 --- a/doc/docs/.vuepress/config.js +++ b/doc/docs/.vuepress/config.js @@ -46,31 +46,75 @@ module.exports = { ['script', { src: '/js/yuescript.js' }], ], + locales: { + '/': { + lang: 'en-US', + title: 'Yuescript', + description: 'A language that compiles to Lua' + }, + + '/zh/': { + lang: 'zh-CN', + title: '月之脚本', + description: '一门编译到 Lua 的语言' + } + }, + /** * Theme configuration, here is the default theme configuration for VuePress. * * ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html */ themeConfig: { - repo: '', - editLinks: false, - docsDir: '', - editLinkText: '', - lastUpdated: false, - nav: [ - { - text: 'Document', - link: '/doc/' + locales: { + '/': { + selectText: 'Languages', + label: 'English', + repo: '', + editLinks: false, + docsDir: '', + editLinkText: '', + lastUpdated: false, + nav: [ + { + text: 'Document', + link: '/doc/' + }, + { + text: 'Try yue!', + link: '/try/', + }, + { + text: 'Github', + link: 'https://github.com/pigpigyyy/Yuescript' + } + ], }, - { - text: 'Try yue!', - link: '/try/', + + '/zh/': { + selectText: '选择语言', + label: '简体中文', + repo: '', + editLinks: false, + docsDir: '', + editLinkText: '', + lastUpdated: false, + nav: [ + { + text: '文档', + link: '/zh/doc/' + }, + { + text: '试一试!', + link: '/zh/try/', + }, + { + text: 'Github', + link: 'https://github.com/pigpigyyy/Yuescript' + } + ], }, - { - text: 'Github', - link: 'https://github.com/pigpigyyy/Yuescript' - } - ], + } }, /** -- cgit v1.2.3-55-g6feb