aboutsummaryrefslogtreecommitdiff
path: root/doc/docs/.vuepress/config.js
blob: bd894287a105c516bc9599d9c189730c6136f862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const { description } = require('../../package')

module.exports = {
	/**
	 * Ref:https://v1.vuepress.vuejs.org/config/#title
	 */
	title: 'Yuescript',
	/**
	 * Ref:https://v1.vuepress.vuejs.org/config/#description
	 */
	description: description,

	/**
	 * Extra tags to be injected to the page HTML `<head>`
	 *
	 * ref:https://v1.vuepress.vuejs.org/config/#head
	 */
	head: [
		['meta', { name: 'theme-color', content: '#3eaf7c' }],
		['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
		['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
		['meta', { property: 'og:title', content: 'Yuescript' }],
		['meta', { property: 'og:description', content: description }],
		// Should probably have a og:url but I'm not sure how to add that without it being the same on all pages
		['meta', { property: 'og:type', content: 'website' }],
		['meta', { property: 'og:image', content: '/image/yuescript.png' }],
		['meta', { property: 'og:image:secure_url', content: '/image/yuescript.png' }],
		['meta', { property: 'og:image:type', content: 'image/png' }],
		['meta', { property: 'og:image:width', content: '1200' }],
		['meta', { property: 'og:image:height', content: '1200' }],
		['link', { rel: 'icon', href: '/image/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }],
		['link', { rel: 'icon', href: '/image/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }],
		['link', { rel: 'apple-touch-icon', href: '/image/favicon/apple-touch-icon-180x180.png', sizes: '180x180', type: 'image/png' }],
		['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-192x192.png', sizes: '192x192', type: 'image/png' }],
		['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-512x512.png', sizes: '512x512', type: 'image/png' }],
		['script', {}, `window.global = window;`],
		['script', {}, `
			var Module = {
				onRuntimeInitialized: function() {
					window.yue = Module;
					window.Vue.$data.readonly = false;
					window.Vue.$data.info = Module.version();
				}
			};
		`],
		['script', { src: '/js/yuescript.js' }],
	],

	/**
	 * 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/'
			},
			{
				text: 'Try yue!',
				link: '/try/',
			},
			{
				text: 'Github',
				link: 'https://github.com/pigpigyyy/Yuescript'
			}
		],
	},

	/**
	 * Apply plugins,ref:https://v1.vuepress.vuejs.org/zh/plugin/
	 */
	plugins: [
		'@vuepress/plugin-back-to-top',
		'@vuepress/plugin-medium-zoom',
		'~plugins/vue-js-modal.js',
	]
}