layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

unintended public route generated for `src/pages/community/Loader.style.js`

Open mesmaio opened this issue 1 week ago β€’ 2 comments

Description

In Gatsby, all js files placed under src/pages/ are automatically treated as site routes unless specifically ignored.

Currently, Loader.style.js (which is just a styled-component used for the community calendar loading fallback) is located directly inside src/pages/community/ path -> https://github.com/layer5io/layer5/blob/master/src/pages/community/Loader.style.js

Because of this, Gatsby builds an unintended standalone route.

Visiting this URL on production returns an HTTP 200 with the global header and footer, but with an empty body containing only the rendered

.

Internal helper stylesheets shouldn't be under src/pages/ as it causes unnecessary build artifacts and leaves empty/soft-404 routes exposed to crawlers.

Steps to Reproduce

  1. Query the live URL via curl: "curl -sI https://layer5.io/community/Loader.style/" This returns HTTP/2 200, whereas an invalid route (e.g. /community/invalid-page/) properly returns 404.
  2. You can also directly go to https://layer5.io/community/Loader.style which is an empty page produced because of the exact reason.

Expected Behavior

Loader.style.js should live in src/sections/Community/Calendar/ alongside the other calendar components/styles, and /community/Loader.style/ should not exist as a site page.

Screenshots

image

Environment:

  • Host OS: MacOS
  • Browser: Chrome

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

mesmaio avatar Nov 23 '26 14:11 mesmaio

I would like to take this issue. I have the project locally setup and can make a PR. Here is my proposed fix:

1.Move src/pages/community/Loader.style.js to src/sections/Community/Calendar/loader.style.js.

2.Update the import in src/pages/community/calendar.js: "import Loader from "../../sections/Community/Calendar/loader.style";"

mesmaio avatar Nov 23 '26 14:11 mesmaio

you can tag maintainers in slack for the issue to get assigned to you

SakshamMawari avatar Nov 23 '26 15:11 SakshamMawari