diff options
author | Li Jin <dragon-fly@qq.com> | 2021-04-19 23:41:33 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-04-19 23:41:33 +0800 |
commit | 5d3b07801456d16dcc2c75dcccd48d508a6b60cc (patch) | |
tree | 2df1a154bf58d93f2475df02afbd15f1a8ba2963 /doc/docs/.vuepress/config.js | |
parent | ea82666506b57d6e905b7f2e5fe78498fe5a7abd (diff) | |
download | yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.tar.gz yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.tar.bz2 yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.zip |
first commit for Yuescript document site.
Diffstat (limited to 'doc/docs/.vuepress/config.js')
-rwxr-xr-x | doc/docs/.vuepress/config.js | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js new file mode 100755 index 0000000..fe34c46 --- /dev/null +++ b/doc/docs/.vuepress/config.js | |||
@@ -0,0 +1,77 @@ | |||
1 | const { description } = require('../../package') | ||
2 | |||
3 | module.exports = { | ||
4 | /** | ||
5 | * Ref:https://v1.vuepress.vuejs.org/config/#title | ||
6 | */ | ||
7 | title: 'Yuescript', | ||
8 | /** | ||
9 | * Ref:https://v1.vuepress.vuejs.org/config/#description | ||
10 | */ | ||
11 | description: description, | ||
12 | |||
13 | /** | ||
14 | * Extra tags to be injected to the page HTML `<head>` | ||
15 | * | ||
16 | * ref:https://v1.vuepress.vuejs.org/config/#head | ||
17 | */ | ||
18 | head: [ | ||
19 | ['meta', { name: 'theme-color', content: '#3eaf7c' }], | ||
20 | ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], | ||
21 | ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], | ||
22 | ['script', {}, `window.global = window;`], | ||
23 | ['script', {}, ` | ||
24 | var Module = { | ||
25 | onRuntimeInitialized: function() { | ||
26 | window.yue = Module; | ||
27 | window.Vue.$data.readonly = false; | ||
28 | window.Vue.$data.info = Module.version(); | ||
29 | } | ||
30 | }; | ||
31 | `], | ||
32 | ['script', {}, ` | ||
33 | var Module = { | ||
34 | onRuntimeInitialized: function() { | ||
35 | window.yue = Module; | ||
36 | } | ||
37 | }; | ||
38 | `], | ||
39 | ['script', { src: '/js/yuescript.js' }], | ||
40 | ], | ||
41 | |||
42 | /** | ||
43 | * Theme configuration, here is the default theme configuration for VuePress. | ||
44 | * | ||
45 | * ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html | ||
46 | */ | ||
47 | themeConfig: { | ||
48 | repo: '', | ||
49 | editLinks: false, | ||
50 | docsDir: '', | ||
51 | editLinkText: '', | ||
52 | lastUpdated: false, | ||
53 | nav: [ | ||
54 | { | ||
55 | text: 'Document', | ||
56 | link: '/doc/' | ||
57 | }, | ||
58 | { | ||
59 | text: 'Try yue!', | ||
60 | link: '/try/', | ||
61 | }, | ||
62 | { | ||
63 | text: 'Github', | ||
64 | link: 'https://github.com/pigpigyyy/Yuescript' | ||
65 | } | ||
66 | ], | ||
67 | }, | ||
68 | |||
69 | /** | ||
70 | * Apply plugins,ref:https://v1.vuepress.vuejs.org/zh/plugin/ | ||
71 | */ | ||
72 | plugins: [ | ||
73 | '@vuepress/plugin-back-to-top', | ||
74 | '@vuepress/plugin-medium-zoom', | ||
75 | '~plugins/vue-js-modal.js', | ||
76 | ] | ||
77 | } | ||