about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-07-04 13:57:59 -0700
committerFranck Cuny <franck@fcuny.net>2024-07-04 13:57:59 -0700
commit185e00e77e05f7fd905962d0555eba9887a8b14a (patch)
treeee32998541716551e7b5f8488c18ac99fef18f9e
parentadd GHA check (diff)
downloadfcuny.net-185e00e77e05f7fd905962d0555eba9887a8b14a.tar.gz
check for broken links
-rw-r--r--.github/workflows/check-links.yaml38
-rw-r--r--.lycheecache109
-rw-r--r--.lycheeignore1
-rw-r--r--content/notes/working-with-nix.md2
-rw-r--r--flake.nix2
-rw-r--r--lychee.toml21
6 files changed, 171 insertions, 2 deletions
diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml
new file mode 100644
index 0000000..ea20952
--- /dev/null
+++ b/.github/workflows/check-links.yaml
@@ -0,0 +1,38 @@
+name: Check links
+on:
+  schedule:
+    - cron: "30 6 * * 0"
+  workflow_dispatch:
+  pull_request:
+    branches:
+      - main
+jobs:
+  lychee:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: DeterminateSystems/nix-installer-action@main
+      - uses: DeterminateSystems/magic-nix-cache-action@main
+      - name: Build the site
+        run: nix build --print-build-logs
+      - name: Restore lychee cache
+        uses: actions/cache@v3
+        with:
+          path: .lycheecache
+          key: cache-lychee-${{ hashFiles('**/*.md') }}
+          restore-keys: cache-lychee-
+      - name: Check links
+        id: lychee
+        uses: lycheeverse/lychee-action@v1
+        with:
+          args: --verbose --no-progress './result/**/*.html'
+          output: ./lycheeresult.md
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Create issue
+        if: ${{ github.event_name != 'pull_request' && env.lychee_exit_code != 0 }}
+        uses: peter-evans/create-issue-from-file@v4
+        with:
+          title: "[lychee] Broken links"
+          content-filepath: ./lycheeresult.md
+          labels: bug, automated issue
diff --git a/.lycheecache b/.lycheecache
new file mode 100644
index 0000000..5c44b02
--- /dev/null
+++ b/.lycheecache
@@ -0,0 +1,109 @@
+https://tailscale.com/,200,1720126295
+https://github.com/NixOS/nixpkgs/blob/fb7287e6d2d2684520f756639846ee07f6287caa/pkgs/development/go-modules/generic/default.nix#L171,200,1720126296
+https://github.com/golang/proposal,200,1720126296
+https://ark.intel.com/content/www/us/en/ark/products/218833/intel-z690-chipset.html,403,1720126295
+https://fcuny.net/blog/google-doc-failure/,200,1720126295
+https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html,200,1720126296
+https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/go-modules/generic/default.nix,404,1720126295
+https://ark.intel.com/content/www/us/en/ark/products/218834/intel-w680-chipset.html,403,1720126295
+https://en.wikipedia.org/wiki/Socket_SP3,200,1720126295
+https://staticcheck.io/,200,1720126296
+https://grafana.com/,200,1720126295
+https://github.com/nix-community/home-manager,200,1720126296
+https://blog.golang.org/go116-module-changes,200,1720126296
+https://www.anandtech.com/show/16881/a-deep-dive-into-intels-alder-lake-microarchitectures/2,200,1720126295
+https://fcuny.net/blog/tailscale-docker-https/,200,1720126295
+https://github.com/containernetworking/cni,200,1720126296
+https://github.com/firecracker-microvm/firecracker-go-sdk#cni,200,1720126296
+https://www.roblox.com/,200,1720126295
+https://en.wikipedia.org/wiki/Socket_AM4#Chipsets,200,1720126295
+http://daiderd.com/nix-darwin/,200,1720126295
+https://github.com/awslabs/tc-redirect-tap,200,1720126296
+https://golang.org/ref/mod#goproxy-protocol,200,1720126296
+https://nixos.org/,200,1720126295
+https://en.wikipedia.org/wiki/Zen_(microarchitecture),200,1720126295
+https://www.wireguard.com/,200,1720126299
+https://github.com/firecracker-microvm/firecracker-go-sdk,200,1720126296
+https://fcuny.net/blog/leaving-twitter/,200,1720126295
+https://tailscale.com/kb/1054/dns/,200,1720126296
+https://ark.intel.com/content/www/us/en/ark/products/218827/intel-q670-chipset.html,403,1720126295
+https://tailscale.com/kb/,200,1720126296
+https://github.com/firecracker-microvm/firecracker/blob/main/docs/rootfs-and-kernel-setup.md#creating-a-kernel-image,200,1720126296
+https://doc.traefik.io/traefik/user-guides/docker-compose/acme-http/,200,1720126295
+https://en.wikipedia.org/wiki/Golden_Cove,200,1720126295
+https://fcuny.net/notes/cpu-power-management/,200,1720126295
+https://github.com/sshaw/git-link#sourcegraph,200,1720126296
+https://www.intel.com/content/www/us/en/products/sku/229721/intel-z790-chipset/specifications.html,403,1720126295
+https://traefik.io/,200,1720126295
+https://fcuny.net/feed.xml,200,1720126295
+https://ark.intel.com/content/www/us/en/ark/products/134594/intel-core-i712700k-processor-25m-cache-up-to-5-00-ghz.html,403,1720126295
+https://whatacold.io/blog/2022-01-22-emacs-eglot-lsp/,200,1720126295
+https://fcuny.net/notes/making-sense-intel-amd-cpus/,200,1720126295
+https://github.com/opencontainers/image-spec/blob/master/manifest.md,200,1720126296
+https://pkg.go.dev/github.com/containerd/containerd,200,1720126296
+https://www.amd.com/en/technologies/3d-v-cache,,1720126390
+https://github.com/fcuny,200,1720126295
+https://en.wikipedia.org/wiki/Gracemont_(microarchitecture),200,1720126295
+https://doc.traefik.io/traefik/user-guides/docker-compose/acme-dns/,200,1720126295
+https://fcuny.net/resume/,200,1720126295
+https://golang.org/ref/mod#private-modules,200,1720126296
+https://ark.intel.com/content/www/us/en/ark/products/218832/intel-b660-chipset.html,403,1720126295
+https://github.com/joaotavora/eglot,200,1720126296
+https://fcuny.net/notes/working-with-go/,200,1720126295
+https://fcuny.net/blog/1password-ssh-agent/,200,1720126295
+https://github.com/firecracker-microvm/firecracker/blob/main/docs/prod-host-setup.md,200,1720126296
+https://fcuny.net/blog/git-link-and-sourcegraph/,200,1720126295
+https://community.mellanox.com/s/article/understanding-pcie-configuration-for-maximum-performance,200,1720126296
+https://fcuny.net/notes/containerd-to-firecracker/,200,1720126295
+https://en.wikichip.org/wiki/intel/turbo_boost_max_technology,200,1720126296
+https://en.wikipedia.org/wiki/LGA_1700,200,1720126295
+https://github.com/golang/go/blob/c95464f0ea3f87232b1f3937d1b37da6f335f336/src/cmd/go/internal/cfg/cfg.go#L269,200,1720126296
+https://blog.1password.com/1password-ssh-agent/,200,1720126295
+https://www.intel.com/content/www/us/en/products/sku/218831/intel-h670-chipset/specifications.html,403,1720126295
+https://github.com/firecracker-microvm/firecracker/releases,200,1720126296
+https://sourcegraph.com/,200,1720126295
+https://en.wikichip.org/wiki/intel/speed_select_technology,200,1720126296
+https://letsencrypt.org/,200,1720126295
+https://fcuny.net/blog/,200,1720126295
+https://fcuny.net/notes/,200,1720126295
+https://cloud.google.com/dns/docs/tutorials/create-domain-tutorial,200,1720126296
+https://www.intel.com/content/www/us/en/products/sku/229719/intel-b760-chipset/specifications.html,403,1720126295
+https://github.com/nixoS/nixpkgs/issues/196800,200,1720126296
+https://fcuny.net/blog/no-ssh-to-prod/,200,1720126295
+https://github.com/superfly/init-snapshot,200,1720126296
+https://github.com/kubernetes/enhancements/tree/master/keps,200,1720126296
+https://en.wikipedia.org/wiki/Golden_Cove#Raptor_Cove,200,1720126295
+https://github.com/sshaw/git-link,200,1720126296
+https://en.wikipedia.org/wiki/Compute_Express_Link,200,1720126295
+https://www.hashicorp.com/products/vault/ssh-with-vault,200,1720126295
+https://pkg.go.dev/github.com/containerd/containerd@v1.4.4/images#Image,200,1720126295
+https://fcuny.net/,200,1720126295
+https://git.fcuny.net/containerd-to-vm/,,1720126295
+https://en.wikipedia.org/wiki/Raptor_Lake,200,1720126295
+https://blog.golang.org/using-go-modules,200,1720126296
+https://nixos.org/manual/nixpkgs/stable/#sec-stdenv-phases,200,1720126295
+https://en.wikipedia.org/wiki/64b/66b_encoding,200,1720126295
+https://fly.io/blog/docker-without-docker/,200,1720126295
+https://fcuny.net/blog/nix-raid-systemd-boot/,200,1720126295
+https://github.com/dominikh/go-mode.el,200,1720126296
+https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application,200,1720126296
+https://github.com/google/pprof,200,1720126296
+https://en.wikipedia.org/wiki/Socket_AM4,200,1720126295
+https://doc.new/,200,1720126296
+https://github.com/opencontainers/image-spec/blob/master/config.md,200,1720126296
+https://fcuny.net/notes/working-with-nix/,200,1720126295
+https://en.wikipedia.org/wiki/List_of_AMD_chipsets#TR4_chipsets,200,1720126295
+https://github.com/NixOS/nixpkgs/blob/fb7287e6d2d2684520f756639846ee07f6287caa/pkgs/development/go-modules/generic/default.nix,200,1720126583
+https://www.intel.com/content/www/us/en/products/sku/229720/intel-h770-chipset.html,403,1720126295
+https://en.wikipedia.org/wiki/8b/10b_encoding,200,1720126295
+https://github.com/nixoS/nixpkgs/issues/199551,200,1720126296
+https://www.intel.com/content/www/us/en/products/sku/218829/intel-h610-chipset/specifications.html,403,1720126295
+https://go-acme.github.io/lego/dns/gcloud/,200,1720126295
+https://nixos.wiki/wiki/Remote_LUKS_Unlocking,200,1720126296
+https://nixos.org/blog/announcements.html#nixos-22.11,200,1720126295
+https://en.wikipedia.org/wiki/Site_reliability_engineering,200,1720126295
+https://en.wikipedia.org/wiki/Socket_TR4,200,1720126295
+https://en.wikipedia.org/wiki/Request_for_Comments,200,1720126295
+https://caitiem.com/2020/03/29/design-docs-markdown-and-git/,200,1720126298
+https://fcuny.net/notes/stuff-about-pcie/,200,1720126295
+https://en.wikichip.org/wiki/intel/turbo_boost_technology,200,1720126296
diff --git a/.lycheeignore b/.lycheeignore
new file mode 100644
index 0000000..239d7c1
--- /dev/null
+++ b/.lycheeignore
@@ -0,0 +1 @@
+https://www.amd.com/en/technologies/3d-v-cache
diff --git a/content/notes/working-with-nix.md b/content/notes/working-with-nix.md
index 7da8ec7..1f5da81 100644
--- a/content/notes/working-with-nix.md
+++ b/content/notes/working-with-nix.md
@@ -28,7 +28,7 @@ In the repository, running `nix develop --build` will build the binary
 ### for Go
 
 For Go, there's the `buildGoModule`. Looking at the
-[source](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/go-modules/generic/default.nix)
+[source](https://github.com/NixOS/nixpkgs/blob/fb7287e6d2d2684520f756639846ee07f6287caa/pkgs/development/go-modules/generic/default.nix)
 we can see there's a definition of what will be done for each phases. As
 a result, we don't have to define them ourselves.
 
diff --git a/flake.nix b/flake.nix
index 4e42cae..ac945a4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -61,7 +61,7 @@
 
         devShells.default = pkgs.mkShell {
           inherit (self.checks.${system}.pre-commit-check) shellHook;
-          buildInputs = with pkgs; [ zola git treefmt ];
+          buildInputs = with pkgs; [ zola git treefmt lychee ];
         };
       });
 }
diff --git a/lychee.toml b/lychee.toml
new file mode 100644
index 0000000..52d3842
--- /dev/null
+++ b/lychee.toml
@@ -0,0 +1,21 @@
+# Enable link caching.
+cache = true
+
+# Discard all cached requests older than one day.
+max_cache_age = "1d"
+
+# Maximum number of allowed retries before a link is declared dead.
+max_retries = 3
+
+# User agent to send with each request.
+# https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome
+user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
+
+# Minimum wait time in seconds between retries of failed requests.
+retry_wait_time = 3
+
+# Comma-separated list of accepted status codes for valid links.
+accept = [200, 403]
+
+# Exclude all private IPs from checking.
+exclude_all_private = true