Menu

1,029 page.tsx files, 991 public URLs, and the entire product is the 38 that are missing
πŸ“°

1,029 page.tsx files, 991 public URLs, and the entire product is the 38 that are missing

DEV Community: nextjsΒ·Daniel PertuΒ·4 days ago
#NxUq8DsH
#devtonextjs#devto#dev#sitemap#pages
Reading 0:00
15s threshold

Two counts from the same repository.

find app -name page.tsx | wc -l β†’ 1029 curl -s /sitemap.xml | grep -c '<loc>' β†’ 991

Enter fullscreen mode

Exit fullscreen mode

Both are correct. In the Next.js App Router a page file and a public URL are not the same unit, and they disagree in both directions. Diffing the two sets took about five minutes and produced a better description of the codebase than any folder tree I could have drawn.

The arithmetic

1,029 page.tsx files

8 of them have a dynamic segment, so 1,021 are a fixed route

991 URLs in the sitemap, all answering 200

The set difference, run properly, says this:

files lines

Public content pages 991 148,824

The dynamic practice runner 1 -

Signed-in product, admin, auth, dev-only 37 4,107

That is the whole business in one table.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.