Skip to content

Commit

Permalink
trim index.html from sitemap (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin authored Jan 3, 2024
2 parents cdc324d + 94d2298 commit 413f5e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import path from 'path'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) // eslint-disable-line @typescript-eslint/naming-convention

function toUrl (url: string): string {
url = url.replace(/[/]index[.]html$/, '/')
return `<url><loc>${url}</loc><changefreq>daily</changefreq></url>`
}

Expand Down

0 comments on commit 413f5e2

Please sign in to comment.