public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH docs] build: add broken-link-check
@ 2024-11-25 10:00 Timothy Nicholson
  0 siblings, 0 replies; only message in thread
From: Timothy Nicholson @ 2024-11-25 10:00 UTC (permalink / raw)
  To: pve-devel

This patch adds a broken-link-check to the docs Makefile that searches
the output HTML for URLs and then tests if they are valid and do not
result in any HTTP errors. This is so that broken links can be detected
easier. Also changed occurences of ceph.com to ceph.com/en, as one
is redirected to the /en page, causing the broken-link-check to
report this URL as invalid.

Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
---

This was requested by Thomas in [0]. If this is sufficient, I would
also do this for pmg-docs and pbs.

 Makefile                   | 5 +++++
 asciidoc/asciidoc-pve.conf | 2 +-
 debian/control             | 1 +
 linkcheckerrc              | 5 +++++
 pve-intro.adoc             | 2 +-
 pve-storage-cephfs.adoc    | 2 +-
 pve-storage-rbd.adoc       | 2 +-
 7 files changed, 15 insertions(+), 4 deletions(-)
 create mode 100644 linkcheckerrc

diff --git a/Makefile b/Makefile
index 801a2a3..3bfa13a 100644
--- a/Makefile
+++ b/Makefile
@@ -262,3 +262,8 @@ clean:
 	rm -rf .pve-doc-depends
 	rm -f pve-doc-generator.mk chapter-index-table.adoc man1-index-table.adoc man5-index-table.adoc man8-index-table.adoc pve-admin-guide-docinfo.xml
 	rm -rf $(DEB_SOURCE)-[0-9]*/
+
+.PHONY: broken-link-check
+broken-link-check: index.html
+	@echo "Checking for broken links in output HTML files..."
+	linkchecker --config=linkcheckerrc --check-extern --no-warnings --ignore-url "^(file|mailto|#)" $(wildcard *.html) || { echo "Check the details above."; exit 1; }
diff --git a/asciidoc/asciidoc-pve.conf b/asciidoc/asciidoc-pve.conf
index 0c28298..73b0e48 100644
--- a/asciidoc/asciidoc-pve.conf
+++ b/asciidoc/asciidoc-pve.conf
@@ -15,6 +15,6 @@ ifndef::docinfo1[]
 author=Proxmox Server Solutions GmbH
 email=support@proxmox.com
 endif::docinfo1[]
-ceph=http://ceph.com[Ceph]
+ceph=https://ceph.com/en/[Ceph]
 cephdocs-url=https://docs.ceph.com/en/quincy
 iconsdir=/usr/share/asciidoc/icons
diff --git a/debian/control b/debian/control
index a947ed3..b16fe1a 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Build-Depends: asciidoc-dblatex,
                proxmox-widget-toolkit-dev,
                rsync,
                source-highlight,
+               linkchecker,
 Standards-Version: 4.6.2
 
 Package: pve-doc-generator
diff --git a/linkcheckerrc b/linkcheckerrc
new file mode 100644
index 0000000..bbc5b39
--- /dev/null
+++ b/linkcheckerrc
@@ -0,0 +1,5 @@
+[filtering]
+ignore=
+    http://yourpowerdnserver.domain.com:8081/api/v1/servers/localhost
+    https://youripaddress:8006
+    http://localhost:9843
diff --git a/pve-intro.adoc b/pve-intro.adoc
index a494efe..8f5be9e 100644
--- a/pve-intro.adoc
+++ b/pve-intro.adoc
@@ -231,7 +231,7 @@ to manage your VMs.
 The support for various storage types is another big task. Notably,
 {pve} was the first distribution to ship ZFS on Linux by default in
 2014. Another milestone was the ability to run and manage
-https://ceph.com/[Ceph] storage on the hypervisor nodes. Such setups
+https://ceph.com/en/[Ceph] storage on the hypervisor nodes. Such setups
 are extremely cost effective.
 
 When we started we were among the first companies providing
diff --git a/pve-storage-cephfs.adoc b/pve-storage-cephfs.adoc
index 8d36246..90d4148 100644
--- a/pve-storage-cephfs.adoc
+++ b/pve-storage-cephfs.adoc
@@ -8,7 +8,7 @@ endif::wiki[]
 
 Storage pool type: `cephfs`
 
-CephFS implements a POSIX-compliant filesystem, using a https://ceph.com[Ceph]
+CephFS implements a POSIX-compliant filesystem, using a https://ceph.com/en/[Ceph]
 storage cluster to store its data. As CephFS builds upon Ceph, it shares most of
 its properties. This includes redundancy, scalability, self-healing, and high
 availability.
diff --git a/pve-storage-rbd.adoc b/pve-storage-rbd.adoc
index 5fe558a..58370df 100644
--- a/pve-storage-rbd.adoc
+++ b/pve-storage-rbd.adoc
@@ -9,7 +9,7 @@ endif::wiki[]
 
 Storage pool type: `rbd`
 
-https://ceph.com[Ceph] is a distributed object store and file system
+https://ceph.com/en/[Ceph] is a distributed object store and file system
 designed to provide excellent performance, reliability and
 scalability. RADOS block devices implement a feature rich block level
 storage, and you get the following advantages:
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-25 10:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-25 10:00 [pve-devel] [PATCH docs] build: add broken-link-check Timothy Nicholson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal