-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (53 loc) · 1.77 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>树莓派官方文档中文版</title>
<link rel="icon" href="./images/favicon.png" sizes="128x128">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
<script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script>
</head>
<body>
<div id="app">
</div>
<script>
window.$docsify = {
basePath: '/docs',
name: 'raspberry-pi-docs-cn',
repo: 'llxlr/raspberry-pi-docs-cn',
logo: '../images/logo2.svg',
subMaxLevel: 2,
auto2top: true,
coverpage: true,
onlyCover: true,
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '_sidebar.md'
}
}
</script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '564881622fa9b8cf6b73',
clientSecret: '38b48a17d59fe705aaaaca10d97aa7eeb38dea54',
repo: 'raspberry-pi-docs-cn',
owner: 'llxlr',
admin: ['llxlr'],
title: location.hash.match(/#/(.*?)([?]|$)/)[1],
id: location.hash.match(/#/(.*?)([?]|$)/)[1],
})
// 监听URL中hash的变化,如果发现换了一个MD文件,那么刷新页面,解决整个网站使用一个gitalk评论issues的问题。
window.onhashchange = function(event){
if(event.newURL.split('?')[0] !== event.oldURL.split('?')[0]) {
location.reload()
}
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>
</html>