diff --git a/.github/htmltest-config.yml b/.github/htmltest-config.yml new file mode 100644 index 000000000..7c2e84268 --- /dev/null +++ b/.github/htmltest-config.yml @@ -0,0 +1,24 @@ +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 +IgnoreURLs: + - "https://twitter.com/scilifelab_DC" + - "https://linkedin.com/company/scilifelab-data-centre" + - "^https://twitter.com/intent/tweet.*$" + - "^https://www.linkedin.com/sharing/share-offsite.*$" + - "^https://www.facebook.com/sharer/sharer.php.*$" + - "^https://doi.org/.*$" +IgnoreDirs: + - "publications" + - "datasets" diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml new file mode 100644 index 000000000..23d23e691 --- /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: '25 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/contact/list.html b/layouts/contact/list.html index 4ea0c37f7..5113c7b46 100644 --- a/layouts/contact/list.html +++ b/layouts/contact/list.html @@ -2,7 +2,7 @@ {{ .Content }} -
+

{{ if eq $.Site.Language.LanguageName "Svenska" }}Kontakta oss{{ else }}Contact and suggestions form{{ end }}

{{ if eq $.Site.Language.LanguageName "Svenska" }}Vänligen fyll i detta formulär för att ge förslag till portalen eller för frågor rörande datadelning eller datahantering. Vänligen fyll i dina kontaktuppgifter om du vill att vi besvarar ditt ärende. Teamet som arbetar med den Svenska Pathogens Portalen kommer att skicka ett svar inom ett par dagar. {{ else }}Please fill out this form to make suggestions for the Swedish Pathogens Portal or to ask a data management or data sharing question. Please provide your contact information if you would like to receive a response. The data portal team will send you a response within the next couple of days.{{ end }}