Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 20, 2025
1 parent 7f111f7 commit 632cb64
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,7 @@ declare module 'vue-router' {
defaults.images = images
if (lastmod)
defaults.lastmod = lastmod
const definition = defu(sitemapConfig, defaults) as Partial<SitemapUrl>
if (!definition.loc) {
// user hasn't provided a loc... lets fallback to a relative path
if (content.path && content.path && content.path.startsWith('/'))
definition.loc = content.path
}
content.sitemap = definition
// loc is required
if (!definition.loc)
delete content.sitemap
content.sitemap = defu(sitemapConfig, defaults) as Partial<SitemapUrl>
ctx.content = content
})

Expand Down

0 comments on commit 632cb64

Please sign in to comment.