Skip to content

Commit b6aed0f

Browse files
Fix doc rendering
1 parent 10eea1a commit b6aed0f

29 files changed

+385
-120
lines changed

book.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ src = "doc"
1010
title = "DD-Ranking API Documentation"
1111

1212
[output.html]
13-
mathjax-support = true
14-
additional-css = ["theme/book.css"]
13+
mathjax-support = true

book/404.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<link rel="stylesheet" href="ayu-highlight.css">
3131

3232
<!-- Custom theme stylesheets -->
33-
<link rel="stylesheet" href="theme/book.css">
3433

3534
<!-- MathJax -->
3635
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -176,6 +175,22 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
176175

177176
</div>
178177

178+
<!-- Livereload script (if served using the cli tool) -->
179+
<script>
180+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
181+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
182+
const socket = new WebSocket(wsAddress);
183+
socket.onmessage = function (event) {
184+
if (event.data === "reload") {
185+
socket.close();
186+
location.reload();
187+
}
188+
};
189+
190+
window.onbeforeunload = function() {
191+
socket.close();
192+
}
193+
</script>
179194

180195

181196

book/augmentations/cutmix.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -203,6 +202,22 @@ <h3 id="example"><a class="header" href="#example">Example</a></h3>
203202

204203
</div>
205204

205+
<!-- Livereload script (if served using the cli tool) -->
206+
<script>
207+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
208+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
209+
const socket = new WebSocket(wsAddress);
210+
socket.onmessage = function (event) {
211+
if (event.data === "reload") {
212+
socket.close();
213+
location.reload();
214+
}
215+
};
216+
217+
window.onbeforeunload = function() {
218+
socket.close();
219+
}
220+
</script>
206221

207222

208223

book/augmentations/dsa.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -216,6 +215,22 @@ <h3 id="example"><a class="header" href="#example">Example</a></h3>
216215

217216
</div>
218217

218+
<!-- Livereload script (if served using the cli tool) -->
219+
<script>
220+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
221+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
222+
const socket = new WebSocket(wsAddress);
223+
socket.onmessage = function (event) {
224+
if (event.data === "reload") {
225+
socket.close();
226+
location.reload();
227+
}
228+
};
229+
230+
window.onbeforeunload = function() {
231+
socket.close();
232+
}
233+
</script>
219234

220235

221236

book/augmentations/mixup.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -203,6 +202,22 @@ <h3 id="example"><a class="header" href="#example">Example</a></h3>
203202

204203
</div>
205204

205+
<!-- Livereload script (if served using the cli tool) -->
206+
<script>
207+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
208+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
209+
const socket = new WebSocket(wsAddress);
210+
socket.onmessage = function (event) {
211+
if (event.data === "reload") {
212+
socket.close();
213+
location.reload();
214+
}
215+
};
216+
217+
window.onbeforeunload = function() {
218+
socket.close();
219+
}
220+
</script>
206221

207222

208223

book/augmentations/overview.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -213,6 +212,22 @@ <h1 id="augmentations"><a class="header" href="#augmentations">Augmentations</a>
213212

214213
</div>
215214

215+
<!-- Livereload script (if served using the cli tool) -->
216+
<script>
217+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
218+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
219+
const socket = new WebSocket(wsAddress);
220+
socket.onmessage = function (event) {
221+
if (event.data === "reload") {
222+
socket.close();
223+
location.reload();
224+
}
225+
};
226+
227+
window.onbeforeunload = function() {
228+
socket.close();
229+
}
230+
</script>
216231

217232

218233

book/config/overview.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -237,6 +236,22 @@ <h1 id="config"><a class="header" href="#config">Config</a></h1>
237236

238237
</div>
239238

239+
<!-- Livereload script (if served using the cli tool) -->
240+
<script>
241+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
242+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
243+
const socket = new WebSocket(wsAddress);
244+
socket.onmessage = function (event) {
245+
if (event.data === "reload") {
246+
socket.close();
247+
location.reload();
248+
}
249+
};
250+
251+
window.onbeforeunload = function() {
252+
socket.close();
253+
}
254+
</script>
240255

241256

242257

book/contributing.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -201,6 +200,22 @@ <h1 id="contributing"><a class="header" href="#contributing">Contributing</a></h
201200

202201
</div>
203202

203+
<!-- Livereload script (if served using the cli tool) -->
204+
<script>
205+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
206+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
207+
const socket = new WebSocket(wsAddress);
208+
socket.onmessage = function (event) {
209+
if (event.data === "reload") {
210+
socket.close();
211+
location.reload();
212+
}
213+
};
214+
215+
window.onbeforeunload = function() {
216+
socket.close();
217+
}
218+
</script>
204219

205220

206221

book/datasets/overview.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -230,6 +229,22 @@ <h3 id="parameters"><a class="header" href="#parameters">Parameters</a></h3>
230229

231230
</div>
232231

232+
<!-- Livereload script (if served using the cli tool) -->
233+
<script>
234+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
235+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
236+
const socket = new WebSocket(wsAddress);
237+
socket.onmessage = function (event) {
238+
if (event.data === "reload") {
239+
socket.close();
240+
location.reload();
241+
}
242+
};
243+
244+
window.onbeforeunload = function() {
245+
socket.close();
246+
}
247+
</script>
233248

234249

235250

book/getting-started/installation.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
32-
<link rel="stylesheet" href="../theme/book.css">
3332

3433
<!-- MathJax -->
3534
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -192,6 +191,22 @@ <h2 id="installation"><a class="header" href="#installation">Installation</a></h
192191

193192
</div>
194193

194+
<!-- Livereload script (if served using the cli tool) -->
195+
<script>
196+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
197+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
198+
const socket = new WebSocket(wsAddress);
199+
socket.onmessage = function (event) {
200+
if (event.data === "reload") {
201+
socket.close();
202+
location.reload();
203+
}
204+
};
205+
206+
window.onbeforeunload = function() {
207+
socket.close();
208+
}
209+
</script>
195210

196211

197212

0 commit comments

Comments
 (0)