Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
158 lines (147 loc) · 5.6 KB
/
Copy pathindex.html
File metadata and controls
158 lines (147 loc) · 5.6 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Hyperf</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Hyperf框架官方文档">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="apple-touch-icon" href="/3.0/logo.png">
<link rel="manifest" href="/3.0/manifest.json">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" href="/3.0/favicon.ico" />
<link rel="stylesheet" href="//unpkg.com/docsify@4/themes/vue.css">
<style>
.app-name-link img {
width: 16%;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="//unpkg.com/docsify@4/lib/docsify.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-php.min.js"></script>
<script src="//unpkg.com/docsify-edit-on-github/index.js"></script>
<script src="//unpkg.com/mermaid@9/dist/mermaid.min.js"></script>
<script>
mermaid.initialize({ startOnLoad: false });
// Set html "lang" attribute based on URL
var lang = location.hash.match(/#\/(zh-tw|zh-hk|en)\//);
if (lang) {
document.documentElement.setAttribute('lang', lang[1]);
}
window.$docsify = {
name: 'Hyperf',
repo: 'hyperf/hyperf',
homepage: 'zh-cn/README.md',
loadSidebar: 'summary.md',
loadNavbar: true,
fallbackLanguages: ['zh-cn', 'en'],
mergeNavbar: true,
themeColor: '#3F51B5',
logo: '/logo.png',
auto2top: true,
subMaxLevel: 4,
topMargin: 20,
search: {
depth: 6,
noData: {
'/en/': 'No results!',
'/zh-cn/': '没有找到结果!',
'/zh-hk/': '沒有找到結果!',
'/zh-tw/': '沒有找到結果!',
'/': '没有找到结果!'
},
paths: 'auto',
placeholder: {
'/en/': 'Type to Search',
'/zh-cn/': '输入关键词搜索',
'/zh-hk/': '輸入關鍵詞搜索',
'/zh-tw/': '輸入關鍵詞搜索',
'/': '输入关键词搜索'
},
pathNamespaces: ['/zh-cn', '/zh-tw', '/zh-hk', '/en']
},
alias: {
'/summary.md': '/zh-cn/summary.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/.*/summary.md': '/zh-cn/summary.md',
'/zh-tw/.*/summary.md': '/zh-tw/summary.md',
'/zh-hk/.*/summary.md': '/zh-hk/summary.md',
'/en/.*/summary.md': '/en/summary.md',
'/(.*)/utils': '/$1/support',
},
nameLink: {
'/zh-cn/': '#/zh-cn/',
'/zh-tw/': '#/zh-tw/',
'/zh-hk/': '#/zh-hk/',
'/en/': '#/en/',
'/': '#/',
},
plugins: [
EditOnGithubPlugin.create('https://github.com/hyperf/hyperf/blob/master/docs/'),
function(hook, vm) {
hook.beforeEach(function(content) {
var shortMatches = ['en'],
// zh-cn is the default so is not present
fullMatches = ['zh-tw', 'zh-hk'],
locale = (navigator.languages
? navigator.languages[0]
: (navigator.language || navigator.userLanguage)).toLowerCase();
for (var i = 0; i < shortMatches.length; i++) {
if (locale.substr(0, 2) === shortMatches[i] && vm.route.path === '/') {
window.location.hash = '/' + shortMatches[i] + '/';
}
}
for (i = 0; i < fullMatches.length; i++) {
if (locale === fullMatches[i] && vm.route.path === '/') {
window.location.hash = '/' + fullMatches[i] + '/';
}
}
let hash = window.location.hash.split(/\/(en|zh-cn|zh-tw|zh-hk)\//);
let lang = hash[1] ?? '';
let path = hash[2] ?? '';
if (lang) {
// Set html "lang" attribute based on URL
document.documentElement.setAttribute('lang', lang);
const versions = document.querySelectorAll('nav > ul > li:nth-child(2) a');
versions.forEach(function(a) {
a.href = a.href + '#/' + lang + '/';
});
}
if (path) {
const translations = document.querySelectorAll('nav > ul > li:nth-child(1) a');
translations.forEach(function(a) {
a.href = a.href + path;
});
}
})
}
],
plantuml: {
skin: 'classic',
},
markdown:{
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return ('<div class="mermaid">' + mermaid.render(lang, code) + '</div>');
}
return this.origin.code.apply(this, arguments);
}
}
}
}
</script>
<script src="//unpkg.com/docsify-copy-code@2/dist/docsify-copy-code.min.js"></script>
<script src="//unpkg.com/docsify@4/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify-plantuml/dist/docsify-plantuml.min.js"></script>
<script src="//unpkg.com/docsify@4/lib/plugins/zoom-image.min.js"></script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan style='display:none;' id='cnzz_stat_icon_1278274447'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "v1.cnzz.com/z_stat.php%3Fid%3D1278274447' type='text/javascript'%3E%3C/script%3E"));</script>
<script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script>
</body>
</html>