-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat(infra): migrate to next.js infrastructure #4981
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,5 +1,3 @@ | |||
# Generated HTML and other static files | |||
build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claudio does not forget the .next
(it is not a priority)
Closing this PR in favor of #4991 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a draft to migrate the underlying infrastructure from Handlebars and Metalsmith to JSX (React) and Next.js.
Changes
Legacy Content Removal
The items above are considered legacy content and pages.
Migration of Structure
A few directories are changed to accommodate the new Next.js folder structure. Notably, these are the significant changes:
src/components
src/styles
locale/{languageCode}/{folder}/{filename}.md
topages/{folder}/{filename}.{languageCode}.mdx
(Plain.md
when no React Component is needed)static/
topublic/static
(Links will be preserved)src/layouts
src/data
src/i18n
The deletion of per-locale
site.json
and creation of a globalsite.json
i18n specific metatdata will be moved to
src/i18n/locales.json
as the aggregate of all i18n metadata. Specific translation texts (such as "Next" button) or other translated text will be moved toi18n
localization files such assrc/i18n/locales/en.json
. This is the same approach adopted currently onnodejs.dev
repository to ease the migration.Navigation structure and other non-related global metadata will be moved towards a global
src/data/site.json
and respectively for Navigation topages/_meta.json
files.Migration of Handlebars Templates to JSX
A lot of the current "Handlebars" scripts (for templating-engine) will be ported to either JavaScript utils or JSX Components, and the current Layouts will be ported to JSX too.
Things to be done (Within this PR)
Since this PR is in a draft state, there are still a few things to be done before we can say we're ready to get this PR reviewed:
locale/
pages to the new directory and file structure formatpages
folder and new file format and update its FrontmatterMigration from old tooling/scripts
Currently, we have scripts to generate the metadata of releases, versions, and the release schedule of Node.js; we should adopt the nodes from Nodejs.dev as they're going to be adopted anyways. This can be done either in this PR or in a follow-up, depending on the complexity of migrating the current scripts.
Open Questions
Items to be done after this PR
As mentioned, this is an initial implementation for this issue, following-up there will still be some improvements to be done, such as removing more legacy content and normalizing the JSX code and a few other things.
After that, we can start porting the layout and content from the Nodejs.dev repository.
Relates to #4958
cc @nodejs/website @nodejs/nodejs-dev @nodejs/build