From 6378fd2487207614cf4183a1e8b1c42c9a4806b2 Mon Sep 17 00:00:00 2001 From: "Sean T. Allen" Date: Tue, 13 Feb 2024 19:25:11 +0000 Subject: [PATCH] Updates for link checking --- .github/workflows/verify-site-builds.yml | 5 +++++ mkdocs.yml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify-site-builds.yml b/.github/workflows/verify-site-builds.yml index 7d90b8d9..4047d847 100644 --- a/.github/workflows/verify-site-builds.yml +++ b/.github/workflows/verify-site-builds.yml @@ -18,6 +18,11 @@ jobs: INSIDERS_PAT: ${{ secrets.MATERIAL_INSIDERS_ACCESS }} - name: Build site run: mkdocs build + env: + // by turning off, we can get checking of anchor links on the site + // not just external urls. see... + // https://github.com/manuzhang/mkdocs-htmlproofer-plugin/issues/46#issuecomment-1494267151 + USE_DIRECTORY_URLS: false - name: Send alert on failure if: ${{ failure() }} uses: zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4 diff --git a/mkdocs.yml b/mkdocs.yml index 2d2f63e4..dd17c1d6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,7 +4,7 @@ copyright: Copyright © 2024 The Pony Developers edit_uri: edit/main/docs/ repo_url: https://github.com/ponylang/ponylang-website/ site_url: https://www.ponylang.io/ -use_directory_urls: true +use_directory_urls: !ENV [USE_DIRECTORY_URLS, true] extra: generator: false @@ -40,10 +40,10 @@ plugins: - ezlinks - htmlproofer: enabled: !ENV [ENABLED_HTMLPROOFER, True] + validate_external_urls: !ENV [VALIDATE_EXTERNAL_URLS, True] raise_error_after_finish: True raise_error_excludes: 429: ["https://github.com/ponylang"] - 404: ["https://github.com/ponylang"] 429: ["https://medium.com"] theme: