mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: Correct URL construction in generateBlogSitemapXml function
This commit is contained in:
@@ -496,7 +496,7 @@ export async function generateBlogSitemapXml(page: number): Promise<string> {
|
||||
const entries: SitemapEntry[] = postsForPage.map((post: BlogPostHeader) => {
|
||||
const loc: string = post.blogUrl.startsWith("http")
|
||||
? post.blogUrl
|
||||
: `${baseUrlString}${post.blogUrl.startsWith("/") ? "" : "/"}${post.blogUrl.replace(/^\//, "")}`;
|
||||
: `${baseUrlString}${post.blogUrl.startsWith("/") ? post.blogUrl : `/${post.blogUrl}`}`;
|
||||
|
||||
return {
|
||||
loc,
|
||||
|
||||
Reference in New Issue
Block a user