Skip to content

Commit

Permalink
fix output paths
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 27, 2024
1 parent b7e72d8 commit 26acb24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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.5.0",
"version": "0.6.0",
"description": "Lightweight global state management library for Fresh framework using Preact signals.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down
8 changes: 3 additions & 5 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ async function generateSitemap(
let pathname = normalize(`/${relPath}`).split(SEPARATOR).join('/')

// Exclude grouping and dynamic directories, _-prefixed files, and index files
if (
pathname.includes('(') || pathname.includes('[') ||
pathname.includes('_')
) continue
pathname = pathname.replace(/\.tsx$/, '').replace(/\/index$/, '')
pathname = pathname.replace(/\(.*?\)/g, '') // Remove content within parentheses
if (pathname.includes('_') || pathname.endsWith('index')) continue
pathname = pathname.replace(/\.tsx$/, '')

const isExcluded = exclude && exclude.test(pathname.substring(1))
const isIncluded = !include || include.test(pathname.substring(1))
Expand Down

0 comments on commit 26acb24

Please sign in to comment.