From d342884ecf059914cfe99fe6f805e426d1503ae0 Mon Sep 17 00:00:00 2001
From: David Runge <dave@sleepmap.de>
Date: Mon, 23 Oct 2023 17:57:29 +0200
Subject: [PATCH 1/3] feat: Add make target to check links in html output using
 lychee

Signed-off-by: David Runge <dave@sleepmap.de>
---
 book/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/book/Makefile b/book/Makefile
index cda2a70..15c0f8a 100644
--- a/book/Makefile
+++ b/book/Makefile
@@ -8,6 +8,7 @@
 # from the environment for the first two.
 SPHINXOPTS    ?=
 SPHINXBUILD   ?= sphinx-build
+LYCHEE ?= lychee
 SOURCEDIR     = source
 BUILDDIR      = build
 
@@ -15,6 +16,9 @@ BUILDDIR      = build
 help:
 	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
+html-linkcheck: html
+	@$(LYCHEE) "$(BUILDDIR)/html/"*.html
+
 .PHONY: help Makefile
 
 # Catch-all target: route all unknown targets to Sphinx using the new

From 6aeaa0d35db725654cce0c77424763ccc9a89c19 Mon Sep 17 00:00:00 2001
From: David Runge <dave@sleepmap.de>
Date: Mon, 23 Oct 2023 18:03:58 +0200
Subject: [PATCH 2/3] fix: Use current link for flowcrypt on sending password
 protected mails

Signed-off-by: David Runge <dave@sleepmap.de>
---
 book/source/10-encryption.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/book/source/10-encryption.md b/book/source/10-encryption.md
index 13b41b1..7e3e4c3 100644
--- a/book/source/10-encryption.md
+++ b/book/source/10-encryption.md
@@ -47,4 +47,4 @@ Produce text around discussion: https://mailarchive.ietf.org/arch/msg/openpgp/ZT
 
 ### SKESK
 
-Also see https://flowcrypt.com/docs/guide/send-and-receive/send-password-protected.html
+Also see https://flowcrypt.com/docs/guide/send-and-receive/send-password-protected-emails.html

From 4d93cafcc18ab1552cf013e823b71c3ad5e4e634 Mon Sep 17 00:00:00 2001
From: David Runge <dave@sleepmap.de>
Date: Mon, 23 Oct 2023 18:05:32 +0200
Subject: [PATCH 3/3] ci: Add steps to test for broken links using lychee

Call the new `html-linkcheck` target to fail on broken links.

Signed-off-by: David Runge <dave@sleepmap.de>
---
 .woodpecker/links.yml | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 .woodpecker/links.yml

diff --git a/.woodpecker/links.yml b/.woodpecker/links.yml
new file mode 100644
index 0000000..01acf6b
--- /dev/null
+++ b/.woodpecker/links.yml
@@ -0,0 +1,23 @@
+# SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project
+# SPDX-License-Identifier: CC0-1.0
+
+clone:
+  git:
+    image: woodpeckerci/plugin-git
+    settings:
+      partial: true
+      lfs: false
+
+when:
+  branch: draft
+  event:
+    - push
+    - pull_request
+
+steps:
+  link-check:
+    image: archlinux:latest
+    commands:
+      - pacman -Sy --needed --noconfirm archlinux-keyring
+      - pacman -Syu --needed --noconfirm lychee make python-myst-parser python-sphinx
+      - make -C book html-linkcheck