Skip to content

Commit 2dbea5f

Browse files
committed
fix: use right hostname
1 parent 408047d commit 2dbea5f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/markopress/src/plugins/seo/sitemap.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ export async function generateSitemap(
143143

144144
try {
145145
// Resolve hostname
146-
const hostname = resolveHostname(config, options);
146+
let hostname = resolveHostname(config, options);
147+
// Remove trailing slash from hostname to avoid double slashes
148+
if (hostname.endsWith('/')) {
149+
hostname = hostname.slice(0, -1);
150+
}
147151

148152
// Get base path for URL handling
149153
const base = config.site?.base || '/';

website/.markopress/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default defineConfig({
6363
],
6464
seo: {
6565
sitemap: {
66-
hostname: 'https://markopress.test',
66+
hostname: 'https://priestch.github.io/markopress/',
6767
}
6868
},
6969
});

0 commit comments

Comments
 (0)