From b204a55d0d27c41ea01cfebffb477afaaf865921 Mon Sep 17 00:00:00 2001 From: Senthilkumar Panneerselvam Date: Fri, 13 Oct 2023 08:22:36 +0200 Subject: [PATCH 1/2] Use relative permalink --- layouts/collections/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/collections/single.html b/layouts/collections/single.html index 8c23f88..d15e22c 100644 --- a/layouts/collections/single.html +++ b/layouts/collections/single.html @@ -181,7 +181,7 @@

Sample information

Materials:
{{ range (.GetTerms "materials") }} - {{ .LinkTitle }} + {{ .LinkTitle }} {{ end }}
@@ -236,4 +236,4 @@
Biobank contact information
-{{ end }} \ No newline at end of file +{{ end }} From 9c70146ef27a0782453f96ef3b6f87ce35e0d32a Mon Sep 17 00:00:00 2001 From: Senthilkumar Panneerselvam Date: Fri, 13 Oct 2023 09:34:40 +0200 Subject: [PATCH 2/2] Add link checker --- .github/htmltest-config.yml | 14 +++++++++++ .github/workflows/link-checker.yml | 39 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/htmltest-config.yml create mode 100644 .github/workflows/link-checker.yml diff --git a/.github/htmltest-config.yml b/.github/htmltest-config.yml new file mode 100644 index 0000000..982ee07 --- /dev/null +++ b/.github/htmltest-config.yml @@ -0,0 +1,14 @@ +CheckDoctype: false +CheckLinks: false +CheckMeta: false +CheckGeneric: false +CheckInternal: false +CheckInternalHash: false +CheckMailto: false +CheckTel: false +CheckMetaRefresh: false +IgnoreInternalEmptyHash: true +IgnoreEmptyHref: true +IgnoreAltMissing: true +IgnoreAltEmpty: true +IgnoreDirectoryMissingTrailingSlash: true diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml new file mode 100644 index 0000000..be0280e --- /dev/null +++ b/.github/workflows/link-checker.yml @@ -0,0 +1,39 @@ +# Run htmltest to check for broken external links +# Scheduled for every first wednesday of the month + +name: Check broken links (htmltest) +on: + workflow_dispatch: + branches: + - develop + schedule: + - cron: '20 8 1-7 * 3' + +jobs: + htmltest: + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: "latest" + + - name: Run Hugo + run: hugo -d dist + + - name: Test HTML + continue-on-error: true + uses: wjdp/htmltest-action@master + with: + path: dist + config: .github/htmltest-config.yml + + - name: Archive htmltest results + uses: actions/upload-artifact@v3 + with: + name: htmltest-report + path: tmp/.htmltest/htmltest.log + retention-days: 7