Commit d090373
committed
improve: Remove canonifyURLs, use absURL
Hugo configuration `canonifyURLs` is a brute force approach to search
for relative URLs with a leading slash and then prepend them with the
baseURL to create absolute URLs after the page is rendered. This
approach is slow and confusing and will be removed in future from Hugo.
Use `absURL` template function in theme layouts to replace
`canonifyURLs`. To support the base URLs with sub directories remove
leading slash in relative URLs.
Fixes: #1 | Blog Footer and header URL's don't seem to follow base path1 parent 92ba9ef commit d090373
3 files changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments