Skip to content

build: apply language based on folder. #1975

Merged
bjohansebas merged 8 commits intogh-pagesfrom
i18n-better-second-try
Jul 18, 2025
Merged

build: apply language based on folder. #1975
bjohansebas merged 8 commits intogh-pagesfrom
i18n-better-second-try

Conversation

@bjohansebas
Copy link
Copy Markdown
Member

@bjohansebas bjohansebas commented Jul 16, 2025

closes #1934

This PR updates how language metadata is applied to files in the site. Instead of using the lang: front matter variable within individual files, the configuration now applies language settings based on file paths using Jekyll’s _config.yml scope and values functionality.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 16, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 06dbd28
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/687a48b3c2b9c800089c5852
😎 Deploy Preview https://deploy-preview-1975--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bjohansebas bjohansebas changed the title I18n better second try build: apply language based on folder. Jul 16, 2025
@bjohansebas bjohansebas force-pushed the i18n-better-second-try branch from db232b4 to ca68038 Compare July 16, 2025 18:03
@bjohansebas bjohansebas marked this pull request as ready for review July 16, 2025 18:07
@bjohansebas bjohansebas requested a review from a team as a code owner July 16, 2025 18:07
@bjohansebas
Copy link
Copy Markdown
Member Author

It seems everything is working fine, @expressjs/docs-wg please review it.

@bjohansebas bjohansebas force-pushed the i18n-better-second-try branch from ca68038 to 67e73ae Compare July 16, 2025 18:13
Comment thread Makefile
serve: ## Local server
@echo "${BLUE}Starting expressjs.com at http://localhost:4000${RESET}"
docker run -p 4000:4000 -p 35729:35729 -v $(DIR):/usr/src/app expressjs.com bundle exec jekyll serve --host 0.0.0.0 --incremental
docker run -p 4000:4000 -p 35729:35729 -v $(DIR):/usr/src/app expressjs.com bundle exec jekyll serve --host 0.0.0.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bug where dynamic texts are not loading correctly, so I'm going to remove this, since that fixes it.

Comment thread css/style.css Outdated
Copy link
Copy Markdown
Member

@ShubhamOulkar ShubhamOulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to document this approach.

Comment thread _config.yml Outdated
Comment thread _config.yml Outdated
@bjohansebas
Copy link
Copy Markdown
Member Author

We need to document this approach.

I'll do it in another PR later, updating more information about Crowdin and all of that.

@ShubhamOulkar
Copy link
Copy Markdown
Member

I'll do it in another PR later, updating more information about Crowdin and all of that.

Need to how page.lang will work in code base. OR if any Jekyll doc link about this setup.

@bjohansebas
Copy link
Copy Markdown
Member Author

Need to how page.lang will work in code base. OR if any Jekyll doc link about this setup.

see https://jekyllrb.com/docs/configuration/front-matter-defaults/

@ShubhamOulkar
Copy link
Copy Markdown
Member

You can remove CSS changes from this PR. It got fixed in #1978. Since we are changing website build process in current PR. It is better to keep it separate. Also that is CSS issue, nothing to do with build changes.

Copy link
Copy Markdown
Member

@ShubhamOulkar ShubhamOulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

I don't know why 404.md is not listed here? If changes got removed then please add it.

image

@bjohansebas
Copy link
Copy Markdown
Member Author

bjohansebas commented Jul 18, 2025

The 404 files can't be translated, which is why they are not uploaded, since Jekyll only serves the root 404 page.

Edit: Or at least that’s what I remember happening when the 404 page was integrated.

@bjohansebas bjohansebas merged commit 120197a into gh-pages Jul 18, 2025
12 checks passed
@bjohansebas
Copy link
Copy Markdown
Member Author

@ShubhamOulkar Thank you for the help.

@bjohansebas bjohansebas deleted the i18n-better-second-try branch July 18, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants