Skip to content
The Node.js website.
JavaScript CSS HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github CI: switch to `actions/checkout@v2` Dec 14, 2019
external/survey-2018 chore: Remove double spaces (#2664) Oct 13, 2019
layouts Add `height: auto` Jan 3, 2020
locale fix some typos in childprocess.md (#2910) Jan 26, 2020
scripts Replace request with node-fetch (#2867) Jan 2, 2020
source Add Release Schedule Nov 11, 2018
static Remove modernizr. Jan 3, 2020
tests/scripts fix: Consistent emphasis and strong (#2678) Oct 15, 2019
.browserslistrc Add initial .browserslistrc file, (#2602) Oct 14, 2019
.editorconfig Remove final newlines from svg Jan 3, 2020
.eslintrc Add .eslintrc to ensure that editor plugins will use the correct conf… Sep 29, 2016
.gitattributes Enforce LF. (#2391) Aug 15, 2019
.gitignore Add `.netlify` in .gitignore (#2728) Oct 31, 2019
.remarkrc chore: Swap Markdownlint for remark-lint (#2580) Oct 18, 2019
.stylelintignore Switch to Sass. Oct 14, 2019
.stylelintrc Switch to stylelint-config-twbs-bootstrap. (#2738) Nov 5, 2019
CODEOWNERS add a missing 'tr' in the CODEOWNERS (#2912) Jan 25, 2020
COLLABORATOR_GUIDE.md fix: Collaborator Guide (#2712) Oct 22, 2019
CONTRIBUTING.md doc: edit "Becoming a Collaborator" (#2750) Nov 8, 2019
LICENSE Uppercase Node.js in LICENSE (#855) Aug 10, 2016
README.md Switch to Sass. Oct 14, 2019
TRANSLATION.md Switch to Sass. Oct 14, 2019
build.js feb-2020 sec release pre-announcement (#2908) Jan 23, 2020
crowdin.yml Configuration file for Crowdin integration (#2344) Jul 23, 2019
package-lock.json build(deps-dev): bump lockfile-lint from 3.0.8 to 3.0.9 (#2916) Jan 27, 2020
package.json build(deps-dev): bump lockfile-lint from 3.0.8 to 3.0.9 (#2916) Jan 27, 2020
server.js Switch to Sass. Oct 14, 2019

README.md

nodejs.org

Build Status Dependency Status MIT Licensed

What is this repo?

nodejs.org by the Node.js Foundation builds on the merged community's past website projects to form a self-publishing, community-managed version of the previous site.

On a technical level, inspiration has been taken from the iojs.org repo while design and content has been migrated from the old nodejs.org repo. These technical changes have helped to facilitate community involvement and empower the foundation's internationalization communities to provide alternative website content in other languages.

This repo's issues section has become the primary home for the Website WG's coordination efforts (meeting planning, minute approval, etc).

Contributing

Please contribute! There are plenty of good first issues to work on. To get started, you have to fork this repo to your own GitHub account first. Then open up a terminal on your machine and enter the following commands:

git clone https://github.com/<your user name>/nodejs.org.git
cd nodejs.org
npm install
npm start

This will start the development server on http://localhost:8080/en/. This should reload automatically when you make changes to the code, but no code is perfect, so sometimes you may need to restart it. :)

If you want to submit a new feature or a bugfix, the best way is to create the changes in a separate branch, e.g.: git checkout -b feature/mycoolfeature. This will make it easier for you to submit a pull request and get your feature merged.

Layout

  • Page templates are in /layouts
  • Global styles are in /layouts/css
  • Global static files are in /static
  • All content is in /locale
    • Initial development usually happens in English: /locale/en
    • /locale/{{locale}}/site.json is where global localization information lives.
    • All content is in Markdown and is per locale.
    • The top of each Markdown file is a block of YAML for page specific localization information that is passed to various templates.
    • The bulk of the Markdown content for each page is referenced as {{{content}}} in the corresponding template.

Serve/Build Options

  • DEFAULT_LOCALE={{locale}} npm run serve builds only the files present in the specified locale folder (will display 404 if file is not present)
  • DEFAULT_LOCALE={{locale}} npm run serve -- --preserveLocale builds the files present in the specified locale folder and adds the pages present in the English locale that are missing.
  • npm run serve builds all languages and returns 404 when a file is not present in the current locale
  • npm run serve -- --preserveLocale builds all languages and adds the pages present in the English locale that are missing.
  • Multiple locales can be built by using comma separated values in the DEFAULT_LOCALE variable. i.e: DEFAULT_LOCALE=en,es,it

Deployment

Full set up is in https://github.com/nodejs/build/tree/master/setup/www minus secrets and certificates. The webhook is setup on GitHub for this project and talks to a small Node server on the host which does the work. See the github-webhook package for this.

Content vs. Code

The Website Working Group is primarily concerned with the code and overall structure of the website.

The content of the website comes from a variety of working groups (Evangelism, Core, i18n, etc). The Website WG defers to these WGs on matters of content and routinely adds collaborators from these working groups as they add and improve content on the website. In other words, the Website WG is not an editorial Working Group except when no other Working Group has taken responsibility for a content area.

You can’t perform that action at this time.