Commit ff13fbe
committed
Add trailing slash to site_url
`site_url` has to end with a trailing slash, because when MkDocs processes the Jinja2 templates, it will embed a script tag into the final html:
```js
<script id="__config" type="application/json">{"base": "/some/path/4.1.1", ...}</script>
```
The JS-relevant part of mike then handles this as follows
`fetch(ABS_BASE_URL + "../versions.json")`
or, if you look at the actual js-bundle:
`new URL("../versions.json", t.base)`
And if `t.base` doesn't end with a trailing slash, the last component is completely ignored, which is obviously not what we want.1 parent 97deaed commit ff13fbe
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments