From effe5739d4babb72092f3a933467aef7cdd34269 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Thu, 19 Dec 2024 11:04:00 -0600 Subject: [PATCH 1/3] Add a link checker for internal links Currently does not test external, lots of noisey false positives. --- .github/workflows/link-checker.yaml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/link-checker.yaml diff --git a/.github/workflows/link-checker.yaml b/.github/workflows/link-checker.yaml new file mode 100644 index 0000000..fbb45fe --- /dev/null +++ b/.github/workflows/link-checker.yaml @@ -0,0 +1,42 @@ +name: Check Links +on: + pull_request: {} + + +jobs: + build-and-test-links: + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + # If your Hugo theme is a submodule, this ensures it gets pulled + submodules: true + + - name: Read hugo version + id: hugo-version + run: | + HUGO_VERSION=$(grep 'HUGO_VERSION' netlify.toml | sed -E 's/.*=\s*"([^"]+)".*/\1/') + echo ${HUGO_VERSION} + echo "HUGO_VERSION=${HUGO_VERSION}" >> "${GITHUB_OUTPUT}" + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '${{ steps.hugo-version.outputs.HUGO_VERSION }}' + + - name: Build site + run: hugo + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3.6' + - name: Create Gemfile and install dependencies + run: | + echo "source 'https://rubygems.org'" > Gemfile + echo "gem 'html-proofer', '5.0.9'" >> Gemfile + bundle install + + - name: Run html-proofer + run: htmlproofer ./public --disable-external --no-enforce-https From 4fe412b5a525f1e9b3e7ddfa37e0618c28e8851b Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Thu, 19 Dec 2024 12:27:20 -0600 Subject: [PATCH 2/3] Break a link to test the test --- content/participate/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/participate/_index.md b/content/participate/_index.md index c4daea5..2d698d2 100644 --- a/content/participate/_index.md +++ b/content/participate/_index.md @@ -6,7 +6,7 @@ title: Participate - [The ReproNim Blog](https://repronim.wordpress.com/) - Sign up for our [mailing list](https://www.nitrc.org/mailman/listinfo/repronim-announcement) - To report site errors, please file an issue at our [github repo](https://github.com/ReproNim/repronim.org) -- Explore, Use, and Contribute to our [Training Resources](/resources/training/) +- Explore, Use, and Contribute to our [Training Resources](/resources/fake-training/) - Interested in becoming a Collaborator or Service Project? [Contact us](mailto:info@repronim.org) - Become a [ReproNim/INCF Fellow](/fellowship/) - Follow our [Webinar series](/about/webinars/) From 6bf87f124c1ff65dd692f8a0b5d30579aa107353 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Thu, 19 Dec 2024 12:29:06 -0600 Subject: [PATCH 3/3] Fixup deliberately broken link --- content/participate/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/participate/_index.md b/content/participate/_index.md index 2d698d2..c4daea5 100644 --- a/content/participate/_index.md +++ b/content/participate/_index.md @@ -6,7 +6,7 @@ title: Participate - [The ReproNim Blog](https://repronim.wordpress.com/) - Sign up for our [mailing list](https://www.nitrc.org/mailman/listinfo/repronim-announcement) - To report site errors, please file an issue at our [github repo](https://github.com/ReproNim/repronim.org) -- Explore, Use, and Contribute to our [Training Resources](/resources/fake-training/) +- Explore, Use, and Contribute to our [Training Resources](/resources/training/) - Interested in becoming a Collaborator or Service Project? [Contact us](mailto:info@repronim.org) - Become a [ReproNim/INCF Fellow](/fellowship/) - Follow our [Webinar series](/about/webinars/)