-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
115 lines (109 loc) · 4.2 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vertigo-docs</title>
<link rel="icon" href="_media/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Vertigo documentation">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/docsify/lib/themes/vue.css" title="vue">
<link rel="stylesheet" href="docs.css" title="vue">
</head>
<body>
<div id="app">Loading ...</div>
<script>
window.$docsify = {
ga: 'UA-9582182-15',
homepage: '/intro/why.md',
fallbackLanguages: ['fr', 'en'],
pathNamespaces: ['/en'],
name: 'vertigo',
logo: 'https://avatars.githubusercontent.com/vertigo-io?s=70',
alias: {
//'/.*/_sidebar.md': '/_sidebar.md',
'/.*/_404.md': '/_404.md',
'/changes': 'https://raw.githubusercontent.com/vertigo-io/vertigo/master/CHANGES.md',
'/changes-extensions': 'https://raw.githubusercontent.com/vertigo-io/vertigo-extensions/master/CHANGES.md',
},
nameLink: {
'/en/': '#/en/',
'/': '#/',
},
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true, // load navbar into sidebar on small screen
subMaxLevel: 2,
auto2top : true,
notFoundPage: true,
search: {
noData: {
'/en/': 'No results!',
'/': 'Aucun resultat!'
},
paths: 'auto',
placeholder: {
'/en/': 'Search',
'/': 'Recherche'
}
},
formatUpdated: '{DD}/{MM} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/vertigo-io/vertigo-docs/blob/master/' + vm.route.file
}
var editHtml = '> [:memo: Aidez à rendre cette documentation meilleure](' + url + ')\n'
return editHtml + html;
});
hook.doneEach(function() {
var $select = $('#versions');
$.ajax({
url: 'https://api.github.com/repos/vertigo-io/vertigo-docs/tags',
}).then(function(options) {
var i = 0;
options.map(function(option) {
var $option = $('<option>');
$option
.val('/vertigo-docs/'+((i>0)?option['name']+'/':''))
.text(option['name']+((i>0)?'':' (current)'));
$select.append($option);
i++;
});
var extractFromLocation = window.location.href.substring(window.location.origin.length,window.location.href.indexOf('/#/')+1);
if(extractFromLocation.includes('draft')) {
$select.append('<option selected value="/vertigo-docs/draft/">draft</option>');
}
$select.val(extractFromLocation);
});
const $search = Docsify.dom.find('div.search');
const $input = Docsify.dom.find($search, 'input');
let gaTimeId;
Docsify.dom.on($input, 'input', e => {
clearTimeout(gaTimeId);
gaTimeId = setTimeout(_ => {
window.ga('set', 'page', '/?s='+e.target.value.trim()+location.hash);
window.ga('send', 'pageview');
}, 500);
});
});
}
]
}
</script>
<script src="https://unpkg.com/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="https://unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="https://unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="https://unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
<script src="https://unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="https://unpkg.com/prismjs/components/prism-java.min.js"></script>
<script src="https://unpkg.com/prismjs/components/prism-yaml.min.js"></script>
<script src="https://unpkg.com/prismjs/components/prism-json.min.js"></script>
</body>
</html>