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 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 }}