mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 18:13:29 +00:00
Fix sitemap URLs (#3220)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"gitbook-v2": patch
|
||||||
|
"gitbook": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix URL in sitemap
|
||||||
@@ -93,6 +93,11 @@ export function createLinker(
|
|||||||
},
|
},
|
||||||
|
|
||||||
toAbsoluteURL(absolutePath: string): string {
|
toAbsoluteURL(absolutePath: string): string {
|
||||||
|
// If the path is already a full URL, we return it as is.
|
||||||
|
if (URL.canParse(absolutePath)) {
|
||||||
|
return absolutePath;
|
||||||
|
}
|
||||||
|
|
||||||
if (!servedOn.host) {
|
if (!servedOn.host) {
|
||||||
return absolutePath;
|
return absolutePath;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user