aboutsummaryrefslogtreecommitdiff
path: root/config.js
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2017-08-31 09:08:38 +0800
committerruki <waruqi@gmail.com>2017-08-31 09:08:38 +0800
commit9078c01303c065fbf6e6cefbddcb462adede7bfb (patch)
treec33052b914aeaca00186e6cc83df6f88f4e1c1b4 /config.js
downloadxmake-docs-9078c01303c065fbf6e6cefbddcb462adede7bfb.tar.gz
xmake-docs-9078c01303c065fbf6e6cefbddcb462adede7bfb.zip
first commit
Diffstat (limited to 'config.js')
-rw-r--r--config.js76
1 files changed, 76 insertions, 0 deletions
diff --git a/config.js b/config.js
new file mode 100644
index 00000000..23330040
--- /dev/null
+++ b/config.js
@@ -0,0 +1,76 @@
+const langs = [
+ {title: 'English', path: '/home'},
+ {title: '中文', path: '/zh/'},
+]
+
+docute.init({
+ landing: true,
+ repo: 'tboox/xmake',
+ twitter: 'waruqi',
+ url: 'http://xmake.io',
+ 'edit-link': 'https://github.com/tboox/xmake-docs/blob/master/docs',
+ announcement(route) {
+ const info = { type: 'success' }
+ if (/\/zh/.test(route.path)) {
+ info.html = '<a style="margin-right:10px;" class="docute-button docute-button-mini docute-button-success" href="/cn/pages/donation.html#donate" target="_blank">捐赠!</a> 通过成为赞助商或者一次性捐赠支持xmake的开发和文档更新。'
+ } else {
+ info.html = '<a style="margin-right:10px;" class="docute-button docute-button-mini docute-button-success" href="/pages/donation.html#donate" target="_blank">Donate!</a> Support xmake development and documentation updates by becoming a sponsor or one-time donation.'
+ }
+ return info
+ },
+ nav: {
+ default: [
+ {
+ title: 'Home', path: '/home'
+ },
+ {
+ title: 'Plugins', path: '/plugins'
+ },
+ {
+ title: 'Manual', path: '/manual'
+ },
+ {
+ title: 'Articles', path: 'http://www.tboox.org/category/#xmake'
+ },
+ {
+ title: 'Feedback', path: 'https://github.com/tboox/xmake/issues'
+ },
+ {
+ title: 'Community', path: 'https://github.com/tboox/community/issues'
+ },
+ {
+ title: 'English', type: 'dropdown', items: langs, exact: true
+ }
+ ],
+ 'zh': [
+ {
+ title: '首页', path: '/zh/'
+ },
+ {
+ title: '插件', path: '/zh/plugins'
+ },
+ {
+ title: '手册', path: '/zh/manual'
+ },
+ {
+ title: '文章', path: 'http://www.tboox.org/cn/category/#xmake'
+ },
+ {
+ title: '反馈', path: 'https://github.com/tboox/xmake/issues'
+ },
+ {
+ title: '社区', path: 'https://github.com/tboox/community/issues'
+ },
+ {
+ title: '中文', type: 'dropdown', items: langs, exact: true
+ }
+ ]
+ },
+ plugins: [
+ docsearch({
+ apiKey: 'fbba61eefc60a833d8caf1fa72bd8ef8',
+ indexName: 'xmake',
+ tags: ['en', 'zh']
+ })
+ ]
+})