From 0317303ab9631d0e178967be697f5e012cd8a19e Mon Sep 17 00:00:00 2001 From: Natik Gadzhi Date: Fri, 25 Aug 2023 17:18:21 -0700 Subject: [PATCH 01/12] Check for broken links in CI test job --- Gemfile | 4 ++++ docker-compose.yaml | 9 +++++---- scripts/test.sh | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100755 scripts/test.sh diff --git a/Gemfile b/Gemfile index 8c1ceb7e7..419277678 100644 --- a/Gemfile +++ b/Gemfile @@ -4,4 +4,8 @@ source 'https://rubygems.org' gem 'jekyll', '~> 4.2.1' gem 'jekyll-redirect-from' +# html-proofer checks for broken links. +# used in docker-compose.yml test job +gem 'html-proofer' + gem "webrick", "~> 1.7" diff --git a/docker-compose.yaml b/docker-compose.yaml index be16897f9..46c3216da 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -40,10 +40,11 @@ services: test: <<: *common - command: /bin/bash -cl " - bundle check - && bundle exec jekyll doctor --source /srv/jekyll --destination /output - && bundle exec jekyll build --source /srv/jekyll --destination /output" + command: /bin/bash -cl "/code/scripts/test.sh" + volumes: + - .:/srv/jekyll:cached + - ./.output:/output:z + - .:/code:z website: <<: *common diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 000000000..9e3a91279 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,14 @@ +set -eu +here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "$here/.." + +bundle check +bundle exec jekyll doctor --source /srv/jekyll --destination /output +bundle exec jekyll build --source /srv/jekyll --destination /output + +# This line runs broken link checks: https://github.com/gjtorikian/html-proofer +bundle exec htmlproofer \ + --ignore-status-codes "429" \ + --only_4xx \ + --ignore-urls twitter.com \ + /output From 349397cb4114b4445789cc512f566948eefe209c Mon Sep 17 00:00:00 2001 From: Natik Gadzhi Date: Fri, 25 Aug 2023 18:53:28 -0700 Subject: [PATCH 02/12] Ignore github.com and don't enforce https: --- scripts/test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 9e3a91279..687c2c58c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -9,6 +9,8 @@ bundle exec jekyll build --source /srv/jekyll --destination /output # This line runs broken link checks: https://github.com/gjtorikian/html-proofer bundle exec htmlproofer \ --ignore-status-codes "429" \ - --only_4xx \ - --ignore-urls twitter.com \ + --only-4xx \ + --no-enforce-https \ + --no-check-external-hash \ + --ignore-urls "/twitter.com/,/github.com/" \ /output From ef5fdc6ea7c54e678677586cdfb8b366885bd28b Mon Sep 17 00:00:00 2001 From: Natik Gadzhi Date: Fri, 25 Aug 2023 22:00:42 -0700 Subject: [PATCH 03/12] Fix swift-5.8-released anchor link as an example --- _posts/2023-03-30-swift-5.8-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2023-03-30-swift-5.8-released.md b/_posts/2023-03-30-swift-5.8-released.md index bff22bb7f..bfb36786b 100644 --- a/_posts/2023-03-30-swift-5.8-released.md +++ b/_posts/2023-03-30-swift-5.8-released.md @@ -6,7 +6,7 @@ title: Swift 5.8 Released! author: [alexandersandberg] --- -Swift 5.8 is now officially released! 🎉 This release includes major additions to the [language and standard library](#language-and-standard-library), including `hasFeature` to support piecemeal adoption of upcoming features, an improved [developer experience](#developer-experience), improvements to tools in the Swift ecosystem including [Swift-DocC](#swift-docc), [Swift Package Manager](#swift-package-manager), and [SwiftSyntax](#swiftsyntax), refined [Windows support](#windows-platform), and more. +Swift 5.8 is now officially released! 🎉 This release includes major additions to the [language and standard library]({% link _posts/2023-03-30-swift-5.8-released.md%}#language-and-standard-library), including `hasFeature` to support piecemeal adoption of upcoming features, an improved [developer experience](#developer-experience), improvements to tools in the Swift ecosystem including [Swift-DocC](#swift-docc), [Swift Package Manager](#swift-package-manager), and [SwiftSyntax](#swiftsyntax), refined [Windows support](#windows-platform), and more. Thank you to everyone in the Swift community who made this release possible. Your Swift Forums discussions, bug reports, pull requests, educational content, and other contributions are always appreciated! From 34500a2f6cb909f2bbf0cb863c368afbd26592e3 Mon Sep 17 00:00:00 2001 From: Natik Gadzhi Date: Sat, 26 Aug 2023 12:32:05 -0700 Subject: [PATCH 04/12] Make footer links https:// --- _includes/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index 48b9c2549..287580085 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -4,8 +4,8 @@

Swift and the Swift logo are trademarks of Apple Inc.

- Privacy Policy - Cookies + Privacy Policy + Cookies