Commit 6ba0e80
Don't base_url-prefix external CSS/JS URLs in theme
extraCss/extraJavaScript entries that are absolute URLs (http(s):// or
protocol-relative //) were being rewritten as {base_url}{href}, producing
broken links like ../../../https://cdn.example.com/x.css.
Skip the base_url/asset rewrite for absolute external URLs in head.html and
scripts.html, emitting them verbatim. Local asset paths are unchanged.
Found while converting a real MkDocs site that references CDN-hosted CSS/JS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 9053be6 commit 6ba0e80
2 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
0 commit comments