-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (75 loc) · 3.15 KB
/
index.html
File metadata and controls
78 lines (75 loc) · 3.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css" />
<link rel="shortcut icon" href="/_media/DevcadeLogoNoText.png">
</head>
<body style="background-color: #2f2f2f;">
<div id="app"></div>
<script>
window.$docsify = {
name: 'Devcade Documentation',
logo: '/_media/DevcadeLogoThin.png',
alias: {
'/website-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-website/main/',
'/library-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-library/main/',
'/onboard-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-onboard/main/',
'/api-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-api/master/',
'/template-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-game-template/main/',
'/flatpakify-repo': 'https://raw.githubusercontent.com/ComputerScienceHouse/devcade-flatpakify/master/'
},
relativePath: true,
loadSidebar: true,
subMaxLevel: 2,
auto2top: true,
plugins: [
// Custom plugin from docsify's own repo. modified to work with non-master branches
function (hook, vm)
{
hook.beforeEach(markdown =>
{
if (/githubusercontent\.com/.test(vm.route.file))
{
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
// Regex captures everything before the branch in one group, and the
// branch onwards in another. Then add blob between
.replace(/(github.com\/.*\/.*\/)(.*\/.*)/, "$1edit/$2");
} else if (/jsdelivr\.net/.test(vm.route.file))
{ // We wont use this so I'm not gonna bother fixing
url = vm.route.file
.replace('cdn.jsdelivr.net/gh', 'github.com')
.replace('@master', '/blob/master');
} else
{
url =
'https://github.com/ComputerScienceHouse/devcade-docs/blob/docs/docs/' +
vm.route.file;
}
// Switched to inserting html so it could be right aligned.
// The html is copied directly from the browser what the md would
// render plus the style float right
const editMd = //'[:memo: Edit Document](' + url + ')\n'
`<p style="float: right">
<a href="${url}" target="_blank" rel="noopener">
<img src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png?v8.png" alt="memo" class="emoji" loading="lazy">
Edit on github
</a>
</p>\n\n`;
return (
editMd +
markdown
);
});
},
]
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4">
</script>
</body>
</html>