We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb72685 commit 78aca78Copy full SHA for 78aca78
.hugo/layouts/partials/hooks/body-end.html
@@ -96,7 +96,9 @@
96
links.forEach(link => {
97
if (!link.name || !link.url) return;
98
99
- let finalUrl = (link.isRight ? link.redirect : link.url).replace(/\/+/g, '/');
+ let rawUrl = link.isRight ? link.redirect : link.url;
100
+ // Only strip double slashes if it is an internal relative link
101
+ let finalUrl = rawUrl.startsWith('http') ? rawUrl : rawUrl.replace(/\/+/g, '/');
102
103
// Apply active version prefix mapping
104
if (!link.isRight && activePrefix !== '/' && !finalUrl.startsWith(activePrefix)) {
0 commit comments