Radish alpha
r
rad:z3trNYnLWS11cJWC6BbxDs5niGo82
Radicle Improvement Proposals (RIPs)
Radicle
Git
flake: Use lychee for link checking
Open fintohaps opened 3 days ago

Introduce lychee link checking in the flake.nix checks. Since nix flake check is limited by sandboxing, it only checks for internal links.

Running lychee from the directory will check external links. In the future, this can be done via git hooks.

3 files changed +28 -0 7e993a9b 7ea99bec
modified .gitignore
@@ -1 +1,3 @@
result
+
.lycheecache
+
.direnv/
modified flake.nix
@@ -17,7 +17,21 @@
      devShells.default = pkgs.mkShell {
        buildInputs = [
          pkgs.asciidoctor
+
          pkgs.lychee
        ];
      };
+

+
      checks.links = pkgs.testers.lycheeLinkCheck {
+
        site = pkgs.lib.sources.sourceFilesBySuffices ./. [".md" ".adoc"];
+
        extraConfig = {
+
          extensions = ["md" "adoc"];
+
          include_fragments = true;
+
          exclude = [
+
            "^rad:.*$"
+
            "^web\\+rad:.*$"
+
            "^vscode:.*$"
+
          ];
+
        };
+
      };
    });
}
added lychee.toml
@@ -0,0 +1,12 @@
+
extensions = ["md", "adoc"]
+
include_fragments = true
+
# Exclude custom URI schemes that lychee cannot resolve
+
exclude = [
+
  '^rad:',
+
  '^web\+rad:',
+
  '^vscode:',
+
]
+
include_mail = false
+
timeout = 20
+
max_retries = 2
+
retry_wait_time = 2