Skip to content

Commit eb6b977

Browse files
committed
Fix URL in sitemap
1 parent 373f18f commit eb6b977

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/healthy-parrots-call.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"gitbook-v2": patch
3+
"gitbook": patch
4+
---
5+
6+
Fix URL in sitemap

packages/gitbook-v2/src/lib/links.ts

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export function createLinker(
9393
},
9494

9595
toAbsoluteURL(absolutePath: string): string {
96+
if (absolutePath.startsWith('http://') || absolutePath.startsWith('https://')) {
97+
return absolutePath;
98+
}
99+
96100
if (!servedOn.host) {
97101
return absolutePath;
98102
}

0 commit comments

Comments
 (0)