Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 28, 2024
1 parent b62c6b7 commit 2b21fa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsoul/fresh-sitemap",
"version": "0.8.1",
"version": "0.8.2",
"description": "Lightweight global state management library for Fresh framework using Preact signals.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down
7 changes: 3 additions & 4 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ async function generateSitemap(
if (key === 'routes') {
pathMap[key] = 0
}
if (key === 'index.tsx') {
pathMap[key] = 0
}
}
return pathMap
}
Expand All @@ -176,10 +173,12 @@ async function generateSitemap(

const checkedSegments = checkSegments(segCheckObj)

const cleanedPath = pathSegments
const neededSegmentsPath = pathSegments
.filter((segment) => checkedSegments[segment] === 1)
.join('/')

const cleanedPath = neededSegmentsPath.replace(/\/index\.tsx$/, '')

// Add the cleaned path to the sitemap if valid
if (cleanedPath) {
sitemapSet.add(
Expand Down

0 comments on commit 2b21fa3

Please sign in to comment.