Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links are mixed case, but files on disk are lowercase #11468

Open
3 tasks done
liudonghua123 opened this issue Jul 12, 2024 · 1 comment
Open
3 tasks done

Links are mixed case, but files on disk are lowercase #11468

liudonghua123 opened this issue Jul 12, 2024 · 1 comment
Labels
effort: medium This task is a medium effort. idle needs decision from engineering p3 We don't have visibility when this will be addressed.

Comments

@liudonghua123
Copy link

Summary

I tried to build the mdn contents via yarn build:prepare && yarn build, then I tried to serve the static files via npx http-server client/build/.

The url like http://localhost:8080/en-us/docs/Web/HTML/ in the html is not correct, it should be http://localhost:8080/en-us/docs/web/html/.

URL

N.A.

Reproduction steps

  1. git clone https://github.com/mdn/content.git && git clone https://github.com/mdn/yari.git
  2. cd yari
  3. yarn && yarn build:prepare && yarn build
  4. npx http-server client/build/
  5. visit http://localhost:8080/en-us/docs/Web/HTML/

Expected behavior

the link path in the generated html should the same case-sensitive as the files in the filesystem.

Actual behavior

parts of the link path becomes PascalCase.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Windows

Screenshot

image

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jul 12, 2024
@LeoMcA LeoMcA changed the title The link path in the static html files are capital, not the same case as the files in the filesystem. Links are mixed case, but files on disk are lowercase Jul 23, 2024
@LeoMcA LeoMcA added p3 We don't have visibility when this will be addressed. needs decision from engineering effort: medium This task is a medium effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jul 23, 2024
@LeoMcA
Copy link
Member

LeoMcA commented Jul 23, 2024

As a fellow case-sensitive file system user (which is obviously the correct behaviour), I feel your pain.

For now, I'd suggest you use our server which will handle the case-insensitivity for you: run that with yarn start:server.

Since the mixed case versions of links are our canonical links, I don't think the fix here should be making the links lowercase, but instead making the files on disk mixed case. This may have knock on effects to our prod deployment which we need to anticipate and potentially fix in our cloud function.

@fiji-flo perhaps a post-rari cleanup task?

@github-actions github-actions bot added the idle label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium This task is a medium effort. idle needs decision from engineering p3 We don't have visibility when this will be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants