Commit 8529e3b
committed
Fix broken internal links when served from subdirectory
Internal links in Markdown sources use root-relative paths like
/ideas/print-backgrounds/, which break when the site is served from
the /csswg-wiki/ subdirectory on GitHub Pages.
Add a Jekyll plugin hook that prepends site.baseurl to absolute
internal href and src attributes in the rendered HTML. When baseurl
is empty (e.g. after switching to the wiki.csswg.org custom domain),
the hook is a no-op.1 parent 6027443 commit 8529e3b
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments